diff options
Diffstat (limited to 'completions/gpg2')
-rw-r--r-- | completions/gpg2 | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/completions/gpg2 b/completions/gpg2 index 45014922..cfa40231 100644 --- a/completions/gpg2 +++ b/completions/gpg2 @@ -10,33 +10,33 @@ _gpg2() _filedir -d return ;; - --sign|--clearsign|--options|--decrypt|-!(-*)s) + --sign | --clearsign | --options | --decrypt | -!(-*)s) _filedir return ;; - --export|--sign-key|--lsign-key|--nrsign-key|--nrlsign-key|--edit-key) + --export | --sign-key | --lsign-key | --nrsign-key | --nrlsign-key | --edit-key) # return list of public keys - COMPREPLY=( $(compgen -W "$($1 --list-keys 2>/dev/null | command sed -ne \ + COMPREPLY=($(compgen -W "$($1 --list-keys 2>/dev/null | command sed -ne \ 's@^pub.*/\([^ ]*\).*$@\1@p' -ne \ - 's@^.*\(<\([^>]*\)>\).*$@\2@p')" -- "$cur") ) + 's@^.*\(<\([^>]*\)>\).*$@\2@p')" -- "$cur")) return ;; - --recipient|-!(-*)r) - COMPREPLY=( $(compgen -W "$($1 --list-keys 2>/dev/null | \ - command sed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" -- "$cur") ) + --recipient | -!(-*)r) + COMPREPLY=($(compgen -W "$($1 --list-keys 2>/dev/null | + command sed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" -- "$cur")) if [[ -e ~/.gnupg/gpg.conf ]]; then - COMPREPLY+=( $(compgen -W "$(command sed -ne \ + COMPREPLY+=($(compgen -W "$(command sed -ne \ 's@^[ \t]*group[ \t][ \t]*\([^=]*\).*$@\1@p' \ - ~/.gnupg/gpg.conf)" -- "$cur") ) + ~/.gnupg/gpg.conf)" -- "$cur")) fi - return - ;; + return + ;; esac - if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '$($1 --dump-options)' -- "$cur") ) + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W '$($1 --dump-options)' -- "$cur")) fi } && -complete -F _gpg2 -o default gpg2 + complete -F _gpg2 -o default gpg2 # ex: filetype=sh |