From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5580 invoked from network); 20 Mar 2001 12:12:07 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Mar 2001 12:12:07 -0000 Received: (qmail 21718 invoked by alias); 20 Mar 2001 12:11:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13676 Received: (qmail 21707 invoked from network); 20 Mar 2001 12:11:52 -0000 Message-ID: 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 From: Peter Stephenson 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 Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070