Skip to content

Commit

Permalink
make it works ciphers ZSH completion #176
Browse files Browse the repository at this point in the history
  • Loading branch information
Turiok committed Nov 1, 2023
1 parent a99c867 commit 1a3c1e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contrib/zsh/_transcrypt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ _transcrypt() {

_arguments \
'(- 1 *)'{-l,--list}'[list encrypted files]' \
'(- 1 *)'{-s,--show-raw=}'[show raw file]:file:->file' \
'(- 1 *)'{-e,--export-gpg=}'[export config to gpg recipient]:recipient:' \
'(- 1 *)'{-s=,--show-raw=}'[show raw file]:file:->file' \
'(- 1 *)'{-e=,--export-gpg=}'[export config to gpg recipient]:recipient:' \
'(- 1 *)'{-v,--version}'[print version]' \
'(- 1 *)'{-h,--help}'[view help message]' \
'(-c --cipher -d --display -f --flush-credentials -u --uninstall)'{-c,--cipher=}'[specify encryption cipher]:cipher:->cipher' \
'(-p --password -d --display -f --flush-credentials -u --uninstall)'{-p,--password=}'[specify encryption password]:password:' \
'(-c --cipher -d --display -f --flush-credentials -u --uninstall)'{-c=,--cipher=}'[specify encryption cipher]:cipher:->cipher' \
'(-p --password -d --display -f --flush-credentials -u --uninstall)'{-p=,--password=}'[specify encryption password]:password:' \
'(-y --yes)'{-y,--yes}'[assume yes and accept defaults]' \
'(-d --display -p --password -c --cipher -r --rekey -u --uninstall)'{-d,--display}'[display current credentials]' \
'(-r --rekey -d --display -f --flush-credentials -u --uninstall)'{-r,--rekey}'[rekey all encrypted files]' \
Expand All @@ -20,12 +20,12 @@ _transcrypt() {
'(-u --uninstall -c --cipher -d --display -f --flush-credentials -p --password -r --rekey)'{-u,--uninstall}'[uninstall transcrypt]' \
'(-set-openssl-path -c --cipher -d --display -f --flush-credentials -p --password -r --rekey)--set-openssl-path=[use OpenSSL at this path]:file:->file' \
'(--upgrade -c --cipher -d --display -f --flush-credentials -p --password -r --rekey)--upgrade[upgrade transcrypt]' \
'(-i --import-gpg -c --cipher -p --password -d --display -f --flush-credentials -u --uninstall)'{-i,--import-gpg=}'[import config from gpg file]:file:->file' \
'(-i --import-gpg -c --cipher -p --password -d --display -f --flush-credentials -u --uninstall)'{-i=,--import-gpg=}'[import config from gpg file]:file:->file' \
&& return 0

case $state in
cipher)
ciphers=( ${(f)"$(_call_program available-ciphers openssl list-cipher-commands)"} )
ciphers=( ${(f)"$(_call_program available-ciphers openssl list -cipher-commands)"} )
_describe -t available-ciphers 'available ciphers' ciphers
;;
file)
Expand Down

0 comments on commit 1a3c1e8

Please sign in to comment.