* PATCH: _mh; handling of mail etc. completion
@ 2001-03-20 12:11 Peter Stephenson
2001-03-21 9:04 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Peter Stephenson @ 2001-03-20 12:11 UTC (permalink / raw)
To: Zsh hackers list
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@csr.com (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@csr.com> Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: _mh; handling of mail etc. completion
2001-03-20 12:11 PATCH: _mh; handling of mail etc. completion Peter Stephenson
@ 2001-03-21 9:04 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2001-03-21 9:04 UTC (permalink / raw)
To: Zsh hackers list
On Mar 20, 12:11pm, Peter Stephenson wrote:
} Subject: PATCH: _mh; handling of mail etc. completion
}
} - There are no completions for standard mail programmes or common
} tools like elm and pine.
You'll note that _mailboxes can handle several such programs, though.
We just don't have a file containing the #compdef line to hook it up.
Of course there's more we *could* do ... even _mutt could, for example,
grovel alias names out of the apprpriate config file to complete in the
userhost state when there's no @ in the word yet.
} - 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@csr.com (where
} csr.com doesn't appear in my normal hosts list for obvious reasons).
Hmm. Is there anything else about the handling of domains that would be
distinct from hosts?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-03-21 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-20 12:11 PATCH: _mh; handling of mail etc. completion Peter Stephenson
2001-03-21 9:04 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).