zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: PATCH: _mh; handling of mail etc. completion
Date: Tue, 20 Mar 2001 12:11:22 +0000	[thread overview]
Message-ID: <Tc0a88d01526862591d@mailsweeper01.cambridgesiliconradio.com> (raw)

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


             reply	other threads:[~2001-03-20 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-20 12:11 Peter Stephenson [this message]
2001-03-21  9:04 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Tc0a88d01526862591d@mailsweeper01.cambridgesiliconradio.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).