summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemail-print-mime-structure4
-rw-r--r--email-print-mime-structure.1.pod13
2 files changed, 8 insertions, 9 deletions
diff --git a/email-print-mime-structure b/email-print-mime-structure
index aac8194..3f29fb9 100755
--- a/email-print-mime-structure
+++ b/email-print-mime-structure
@@ -155,9 +155,9 @@ def main() -> None:
epilog="Example: email-print-mime-structure <message.eml")
parser.add_argument('--pgpkey', metavar='KEYFILE', action='append',
help='OpenPGP Transferable Secret Key for decrypting')
- parser.add_argument('--use-gpg-agent', metavar='true|false', type=bool,
- default=False,
+ parser.add_argument('--use-gpg-agent', action='store_true',
help='Ask local GnuPG installation for decryption')
+ parser.set_defaults(use_gpg_agent=False)
if argcomplete:
argcomplete.autocomplete(parser)
diff --git a/email-print-mime-structure.1.pod b/email-print-mime-structure.1.pod
index e4634e6..7201f48 100644
--- a/email-print-mime-structure.1.pod
+++ b/email-print-mime-structure.1.pod
@@ -32,19 +32,18 @@ key.
OpenPGP secret keys listed in B<--pgpkey=> are used ephemerally, and
do not interact with any local GnuPG keyring.
-=item B<--use-gpg-agent=>I<true>|I<false>
+=item B<--use-gpg-agent>
-If I<true>, and B<email-print-mime-structure> encounters a
-PGP/MIME-encrypted part, it will try to decrypt the part using the
-secret keys found in the local installation of GnuPG. (default:
-I<false>)
+If this flag is present, and B<email-print-mime-structure> encounters
+a PGP/MIME-encrypted part, it will try to decrypt the part using the
+secret keys found in the local installation of GnuPG.
-If both B<--pgpkey=>I<KEYFILE> and B<--use-gpg-agent=true> are
+If both B<--pgpkey=>I<KEYFILE> and B<--use-gpg-agent> are
supplied, I<KEYFILE> arguments will be tried before falling back to
GnuPG.
If B<email-print-mime-structure> has been asked to decrypt parts with
-either B<--pgpkey=>I<KEYFILE> or with B<--use-gpg-agent=true>, and it
+either B<--pgpkey=>I<KEYFILE> or with B<--use-gpg-agent>, and it
is unable to decrypt an encrypted part, it will emit a warning to
stderr.