Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _mh; handling of mail etc. completion
- X-seq: zsh-workers 13676
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: _mh; handling of mail etc. completion
- Date: Tue, 20 Mar 2001 12:11:22 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Here are some minor tweaks for _mh which handle the new MH system better.
I copied the bit for mhmail (a drop-in replacement for Berkeley mail) from
_mutt. But it seems to me completion regarding mail and associated things
has been a bit forgotten about (certainly by me). It's fairly minor,
though; most people probably don't do this from the command line much.
- There are no completions for standard mail programmes or common
tools like elm and pine.
- There is no special handling user@domain instead of user@host. This
can be done with contexts, but maybe it would be nicer to have some
special mail _user_at_host handling which allows pws@xxxxxxx (where
csr.com doesn't appear in my normal hosts list for obvious reasons).
Index: Completion/User/_mh
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_mh,v
retrieving revision 1.5
diff -u -r1.5 _mh
--- Completion/User/_mh 2000/07/24 20:32:56 1.5
+++ Completion/User/_mh 2001/03/20 12:06:10
@@ -1,4 +1,4 @@
-#compdef folder folders comp inc mark refile repl scan show next prev rmm pick whom mhn mhpath
+#compdef folder folders comp inc mark refile repl scan show next prev rmm pick whom mhn mhpath mhlist mhstore mhshow mhparam mhmail
# Completion for all possible MH commands.
@@ -50,6 +50,11 @@
_wanted -C "$prev" values expl 'CC address' compadd all to cc me
elif [[ "$prev" = -[rw]cache ]]; then
_wanted -C "$prev" values expl cache compadd public private never ask
+elif [[ $service = mhparam ]]; then
+ _wanted parameters expl 'MH parameter' compadd - \
+ ${${(f)"$(mhparam -all)"}%%:*}
+elif [[ $service = mhmail ]]; then
+ _user_at_host
else
# Generate sequences.
local foldnam folddir f ret
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author