diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2019-11-10 09:31:58 -0500 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-11-10 09:00:15 -0700 |
commit | 818dba1efe67f7b01f6d601c6462a40567c9ed7f (patch) | |
tree | 2f194e6d58278545f264adf9f2a70867b9562f56 /Makefile | |
parent | 677d6ed933a073a3bc3b2c461f49a97b0cbefebd (diff) | |
download | mailscripts-818dba1efe67f7b01f6d601c6462a40567c9ed7f.tar.gz |
email-print-mime-structure: add tab completion
This is modeled after the use of argcomplete in diffoscope, and it
should be possible to use it for any other pythonic mailscript that
uses argparse.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -3,14 +3,21 @@ MANPAGES=mdmv.1 mbox2maildir.1 \ email-extract-openpgp-certs.1 \ email-print-mime-structure.1 \ notmuch-import-patch.1 +COMPLETIONS=completions/bash/email-print-mime-structure -all: $(MANPAGES) +all: $(MANPAGES) $(COMPLETIONS) clean: rm -f $(MANPAGES) + rm -rf completions %.1: %.1.pod pod2man --section=1 --date="Debian Project" --center="User Commands" \ --utf8 \ --name=$(subst .1,,$@) \ $^ $@ + +completions/bash/%: + mkdir -p completions/bash + register-python-argcomplete3 $(notdir $@) > $@.tmp + mv $@.tmp $@ |