summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_gpg
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@fairlystable.org>2025-04-30 02:07:56 -0700
committerJoe Rayhawk <jrayhawk@fairlystable.org>2025-04-30 02:07:56 -0700
commit26e09889646be3ea65b4a3dfeda26213e4bb6a27 (patch)
tree4f3c73a9416bf47ad7e125383d23cf42879e38d7 /Completion/Unix/Command/_gpg
parent841bce705a58b04220b1f257abcc00ae71cbdbdc (diff)
parent001cba48ce3b964cf01fb3e2af54b20eacbc9bf5 (diff)
downloadzsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.tar.gz
zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_gpg')
-rw-r--r--Completion/Unix/Command/_gpg13
1 files changed, 11 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_gpg b/Completion/Unix/Command/_gpg
index 5d54865d5..ea0a452f2 100644
--- a/Completion/Unix/Command/_gpg
+++ b/Completion/Unix/Command/_gpg
@@ -29,7 +29,7 @@ fi
'(-c --symmetric)'{-c,--symmetric}'[encrypt with symmetric cipher only]'
'(-s --sign)'{-s,--sign}'[make a signature]'
'*'{-r+,--recipient}'[specify user to encrypt for]:recipient:->public-keys'
- '(-u --local-user)'{-u+,--local-user}'[use name as the user ID to sign]:user attachment:_users'
+ '(-u --local-user)'{-u+,--local-user}'[use name as the user ID to sign]:key:->secret-keys'
'(-o --output)'{-o+,--output}'[write output to file]:output file:_files'
'(-h --help)'{-h,--help}'[display usage information]'
'--version[print info on program version and supported algorithms]'
@@ -93,6 +93,7 @@ fi
'--no-default-recipient[reset default recipient]'
'*--encrypt-to[specify recipient]:key:->public-keys'
'(--encrypt-to)--no-encrypt-to[disable the use of all --encrypt-to keys]'
+ '--group[set up email aliases]:spec'
'-z[specify compression level]:compression level:((0\:no\ compression 1\:minimum 2 3 4 5 6\:default 7 8 9\:maximum))'
'(-t --textmode)'{-t,--textmode}'[use canonical text mode]'
'(-n --dry-run)'{-n,--dry-run}"[don't make any changes]"
@@ -117,6 +118,7 @@ fi
'--utf8-strings' '--no-utf8-strings[arguments are not in UTF8]'
'(--no-options)--options[specify file to read options from]:options file:_files'
"(--options)--no-options[don't read options file]"
+ '--log-file[write server mode logs to file]:file:_files'
'--'{attribute,passphrase,command}'-fd:file descriptor:_file_descriptors'
'--sk-comments[include secret key comments when exporting keys]'
'(--emit-version)--no-emit-version[omit version string in clear text signatures]'
@@ -170,6 +172,9 @@ fi
'--ctapi-driver[file to use to access smartcard reader]:file:_files'
'--pcsc-driver[file to use to access smartcard reader]:file:_files'
'--auto-key-locate:parameters'
+ '--auto-key-import[import missing key from a signature]'
+ '--include-key-block[include the public key in signatures]'
+ '--disable-dirmngr[disable all access to the dirmngr]'
'--dump-options[show all options]'
)
@@ -233,7 +238,11 @@ case "$state" in
parts=("${(@s.:.)secret_keys_lines[$i]}")
if [[ ${parts[1]} == "fpr" ]]; then
current_uid="${parts[10]}"
- i=$((i + 1))
+ until [[ "${${(@s.:.)secret_keys_lines[$i]}[1]}" == "uid" ]] || [[ "${i}" -ge "${#secret_keys_lines[@]}" ]]; do
+ # it can be "grp" or other tokens.
+ # Let's iterate until we found "uid" or face an end of secret keys array
+ i=$((i + 1))
+ done
parts=("${(@s.:.)secret_keys_lines[$i]}")
while [[ ${parts[1]} == "uid" ]]; do
uids+=("${current_uid}")