aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-07-09 09:24:54 +0000
committerWerner Koch <[email protected]>2020-07-09 09:24:54 +0000
commit212f9b20b5f7617fc00bada61477d21b8081d591 (patch)
tree5fd7cc119cffd4afb6ed440a93a3d98f25488ef5
parentDo not use the pinentry's qualitybar (diff)
downloadgnupg-212f9b20b5f7617fc00bada61477d21b8081d591.tar.gz
gnupg-212f9b20b5f7617fc00bada61477d21b8081d591.zip
gpg: Print a note if no args are given to --delete-key
-- It is a bit surprising that nothing happens if no key is specified to --delete-key et al. Although this is common Unix behaviour the use might have expected that it behaves like --export and deletes all keys. Sure we don't do the latter, so a short notice will help. GnuPG-bug-id: 4959 Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--g10/gpg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 3239983a1..ce9197574 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4481,7 +4481,10 @@ main (int argc, char **argv)
case aDeleteSecretKeys:
case aDeleteSecretAndPublicKeys:
sl = NULL;
- /* I'm adding these in reverse order as add_to_strlist2
+ /* Print a note if the user did not specify any key. */
+ if (!argc && !opt.quiet)
+ log_info (_("Note: %s\n"), gpg_strerror (GPG_ERR_NO_KEY));
+ /* I'm adding these in reverse order as add_to_strlist2
reverses them again, and it's easier to understand in the
proper order :) */
for( ; argc; argc-- )