diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index a5f1092..9934a0b 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -1,5 +1,5 @@ " Name: gnupg.vim -" Last Change: 2014 Jul 27 +" Last Change: 2014 Aug 10 " Maintainer: James McCoy " Original Author: Markus Braun " Summary: Vim plugin for transparent editing of gpg encrypted files. @@ -1267,10 +1267,11 @@ endfunction " Returns: command output " function s:GPGSystem(dict) - let commandline = printf('%s %s', s:GPGCommand, a:dict.args) + let commandline = s:GPGCommand if (!empty(g:GPGHomedir)) let commandline .= ' --homedir ' . shellescape(g:GPGHomedir) endif + let commandline .= ' ' . a:dict.args let commandline .= ' ' . s:stderrredirnull call s:GPGDebug(a:dict.level, "command: ". commandline) @@ -1293,10 +1294,11 @@ endfunction " redirect - Shell redirect to use, if needed " function s:GPGExecute(dict) - let commandline = printf('%s%s %s', a:dict.ex, s:GPGCommand, a:dict.args) + let commandline = printf('%s%s', a:dict.ex, s:GPGCommand) if (!empty(g:GPGHomedir)) let commandline .= ' --homedir ' . shellescape(g:GPGHomedir, 1) endif + let commandline .= ' ' . a:dict.args if (has_key(a:dict, 'redirect')) let commandline .= ' ' . a:dict.redirect endif