From 713c8f2d322024d26a3d3c469d7babe1ae803169 Mon Sep 17 00:00:00 2001 From: David Adam Date: Fri, 1 Nov 2019 21:16:24 +0800 Subject: [PATCH] gpg completions: add further options Restores work from #6251 wiped out by merge. --- share/functions/__fish_complete_gpg.fish | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_complete_gpg.fish b/share/functions/__fish_complete_gpg.fish index 4843d6de5..a915a9cce 100644 --- a/share/functions/__fish_complete_gpg.fish +++ b/share/functions/__fish_complete_gpg.fish @@ -21,6 +21,8 @@ function __fish_complete_gpg -d "Internal function for gpg completion code dedup complete -c $__fish_complete_gpg_command -l no-sig-create-check -d "Do not verify each signature right after creation" complete -c $__fish_complete_gpg_command -l pgp2 -d "Set up all options to be as PGP 2.x compliant as possible" complete -c $__fish_complete_gpg_command -l rfc1991 -d "Try to be more RFC-1991 compliant" + complete -c $__fish_complete_gpg_command -l delete-key -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Remove key from the public keyring" + complete -c $__fish_complete_gpg_command -l delete-secret-key -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Remove key from the secret and public keyring" else complete -c $__fish_complete_gpg_command -l no-keyring -d "Do not use any keyring at all" complete -c $__fish_complete_gpg_command -l no-skip-hidden-recipients -d "During decryption, do not skip all anonymous recipients" @@ -80,6 +82,8 @@ function __fish_complete_gpg -d "Internal function for gpg completion code dedup complete -c $__fish_complete_gpg_command -l change-passphrase -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Change the passphrase of the secret key belonging to the given user id" complete -c $__fish_complete_gpg_command -l agent-program -d "Specify an agent program to be used for secret key operations" complete -c $__fish_complete_gpg_command -l clear-sign -d "Make a clear text signature" + complete -c $__fish_complete_gpg_command -l delete-keys -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Remove key from the public keyring" + complete -c $__fish_complete_gpg_command -l delete-secret-keys -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Remove key from the secret and public keyring" end # @@ -115,8 +119,6 @@ function __fish_complete_gpg -d "Internal function for gpg completion code dedup complete -c $__fish_complete_gpg_command -l sign-key -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Sign a public key with your secret key" complete -c $__fish_complete_gpg_command -l lsign-key -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Sign a public key with your secret key but mark it as non exportable" - complete -c $__fish_complete_gpg_command -l delete-key -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Remove key from the public keyring" - complete -c $__fish_complete_gpg_command -l delete-secret-key -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Remove key from the secret and public keyring" complete -c $__fish_complete_gpg_command -l delete-secret-and-public-key -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Same as --delete-key, but if a secret key exists, it will be removed first" complete -c $__fish_complete_gpg_command -l gen-revoke -xa "(__fish_complete_gpg_user_id $__fish_complete_gpg_command)" -d "Generate a revocation certificate for the complete key" @@ -147,6 +149,9 @@ function __fish_complete_gpg -d "Internal function for gpg completion code dedup complete -c $__fish_complete_gpg_command -l gen-random -xa "0 1 2" -d "Emit specified number of random bytes of the given quality level" + complete -c $__fish_complete_gpg_command -l card-status -x -d "Print smartcard status" + complete -c $__fish_complete_gpg_command -l change-pin -x -d "Change smartcard PIN" + complete -c $__fish_complete_gpg_command -l version -d "Display version and supported algorithms, and exit" complete -c $__fish_complete_gpg_command -l warranty -d "Display warranty and exit" complete -c $__fish_complete_gpg_command -s h -l help -d "Display help and exit" @@ -363,4 +368,6 @@ function __fish_complete_gpg -d "Internal function for gpg completion code dedup complete -c $__fish_complete_gpg_command -l personal-compress-preferences -x -d "Set the list of personal compression preferences to the specified string" complete -c $__fish_complete_gpg_command -l default-preference-list -x -d "Set the list of default preferences to the specified string" + + complete -c $__fish_complete_gpg_command -l openpgp -x -d "Use strict OpenPGP behaviour" end