Added an option to set the gpg executable.
This commit is contained in:
parent
fceb8855f9
commit
ac6ec713e6
@ -42,6 +42,10 @@
|
|||||||
"
|
"
|
||||||
" Variables:
|
" Variables:
|
||||||
"
|
"
|
||||||
|
" g:GPGExecutable
|
||||||
|
" If set used as gpg executable, otherwise the system chooses what is run
|
||||||
|
" when "gpg" is called. Defaults to "gpg".
|
||||||
|
"
|
||||||
" g:GPGUseAgent
|
" g:GPGUseAgent
|
||||||
" If set to 0 a possible available gpg-agent won't be used. Defaults to 1.
|
" If set to 0 a possible available gpg-agent won't be used. Defaults to 1.
|
||||||
"
|
"
|
||||||
@ -52,11 +56,12 @@
|
|||||||
" If set to 1 armored data is preferred for new files. Defaults to 0.
|
" If set to 1 armored data is preferred for new files. Defaults to 0.
|
||||||
"
|
"
|
||||||
" Credits:
|
" Credits:
|
||||||
" Mathieu Clabaut for inspirations through his vimspell.vim script.
|
" - Mathieu Clabaut for inspirations through his vimspell.vim script.
|
||||||
" Richard Bronosky for patch to enable ".pgp" suffix.
|
" - Richard Bronosky for patch to enable ".pgp" suffix.
|
||||||
" Erik Remmelzwaal for patch to enable windows support and patient beta
|
" - Erik Remmelzwaal for patch to enable windows support and patient beta
|
||||||
" testing.
|
" testing.
|
||||||
" Lars Becker for patch to make gpg2 working.
|
" - Lars Becker for patch to make gpg2 working.
|
||||||
|
" - Thomas Arendsen Hein for patch to convert encoding of gpg output
|
||||||
"
|
"
|
||||||
" Section: Plugin header {{{1
|
" Section: Plugin header {{{1
|
||||||
if (exists("g:loaded_gnupg") || &cp || exists("#BufReadPre#*.\(gpg\|asc\|pgp\)"))
|
if (exists("g:loaded_gnupg") || &cp || exists("#BufReadPre#*.\(gpg\|asc\|pgp\)"))
|
||||||
@ -102,6 +107,11 @@ fun s:GPGInit()
|
|||||||
" we don't want a swap file, as it writes unencrypted data to disk
|
" we don't want a swap file, as it writes unencrypted data to disk
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
|
||||||
|
" check what gpg command to use
|
||||||
|
if (!exists("g:GPGExecutable"))
|
||||||
|
let g:GPGExecutable = "gpg"
|
||||||
|
endif
|
||||||
|
|
||||||
" check if gpg-agent is allowed
|
" check if gpg-agent is allowed
|
||||||
if (!exists("g:GPGUseAgent"))
|
if (!exists("g:GPGUseAgent"))
|
||||||
let g:GPGUseAgent = 1
|
let g:GPGUseAgent = 1
|
||||||
@ -133,9 +143,9 @@ fun s:GPGInit()
|
|||||||
echo "gpg-agent might not work."
|
echo "gpg-agent might not work."
|
||||||
echohl None
|
echohl None
|
||||||
endif
|
endif
|
||||||
let s:GPGCommand="gpg --use-agent"
|
let s:GPGCommand=g:GPGExecutable . " --use-agent"
|
||||||
else
|
else
|
||||||
let s:GPGCommand="gpg --no-use-agent"
|
let s:GPGCommand=g:GPGExecutable . " --no-use-agent"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" don't use tty in gvim
|
" don't use tty in gvim
|
||||||
|
Loading…
x
Reference in New Issue
Block a user