Add g:GPGUsePipes variable to avoid saving unencrypted data to tempfiles
Signed-off-by: James Vega <vega.james@gmail.com>
This commit is contained in:
parent
ea09d9fd0e
commit
d19a59165d
@ -1,6 +1,6 @@
|
|||||||
" Name: gnupg.vim
|
" Name: gnupg.vim
|
||||||
" Last Change: 2011 June 26
|
" Last Change: 2011 Aug 01
|
||||||
" Author: James Vega <vega.james@gmail.com>
|
" Maintainer: James Vega <vega.james@gmail.com>
|
||||||
" Original Author: Markus Braun <markus.braun@krawel.de>
|
" Original Author: Markus Braun <markus.braun@krawel.de>
|
||||||
" Summary: Vim plugin for transparent editing of gpg encrypted files.
|
" Summary: Vim plugin for transparent editing of gpg encrypted files.
|
||||||
" License: This program is free software; you can redistribute it and/or
|
" License: This program is free software; you can redistribute it and/or
|
||||||
@ -84,6 +84,11 @@
|
|||||||
" If set, these recipients are used as defaults when no other recipient is
|
" If set, these recipients are used as defaults when no other recipient is
|
||||||
" defined. This variable is a Vim list. Default is unset.
|
" defined. This variable is a Vim list. Default is unset.
|
||||||
"
|
"
|
||||||
|
" g:GPGUsePipes
|
||||||
|
" If set to 1, use pipes instead of temporary files when interacting with
|
||||||
|
" gnupg. When set to 1, this can cause terminal-based gpg agents to not
|
||||||
|
" display correctly when prompting for passwords. Defaults to 0.
|
||||||
|
"
|
||||||
" Known Issues: {{{2
|
" Known Issues: {{{2
|
||||||
"
|
"
|
||||||
" In some cases gvim can't decrypt files
|
" In some cases gvim can't decrypt files
|
||||||
@ -129,7 +134,7 @@
|
|||||||
if (exists("g:loaded_gnupg") || &cp || exists("#BufReadCmd*.\(gpg\|asc\|pgp\)"))
|
if (exists("g:loaded_gnupg") || &cp || exists("#BufReadCmd*.\(gpg\|asc\|pgp\)"))
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_gnupg = '2.0'
|
let g:loaded_gnupg = '2.1'
|
||||||
let s:GPGInitRun = 0
|
let s:GPGInitRun = 0
|
||||||
|
|
||||||
" check for correct vim version {{{2
|
" check for correct vim version {{{2
|
||||||
@ -227,6 +232,11 @@ function s:GPGInit()
|
|||||||
let g:GPGDefaultRecipients = []
|
let g:GPGDefaultRecipients = []
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" prefer not to use pipes since it can garble gpg agent display
|
||||||
|
if (!exists("g:GPGUsePipes"))
|
||||||
|
let g:GPGUsePipes = 0
|
||||||
|
endif
|
||||||
|
|
||||||
" print version
|
" print version
|
||||||
call s:GPGDebug(1, "gnupg.vim ". g:loaded_gnupg)
|
call s:GPGDebug(1, "gnupg.vim ". g:loaded_gnupg)
|
||||||
|
|
||||||
@ -261,7 +271,7 @@ function s:GPGInit()
|
|||||||
" noshelltemp isn't currently supported on Windows, but it doesn't cause any
|
" noshelltemp isn't currently supported on Windows, but it doesn't cause any
|
||||||
" errors and this future proofs us against requiring changes if Windows
|
" errors and this future proofs us against requiring changes if Windows
|
||||||
" gains noshelltemp functionality
|
" gains noshelltemp functionality
|
||||||
let s:shelltemp = 0
|
let s:shelltemp = !g:GPGUsePipes
|
||||||
if (has("unix"))
|
if (has("unix"))
|
||||||
" unix specific settings
|
" unix specific settings
|
||||||
let s:shellredir = ">%s 2>&1"
|
let s:shellredir = ">%s 2>&1"
|
||||||
|
Loading…
Reference in New Issue
Block a user