Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compctl question



On Fri, May 07, 1999 at 10:44:46AM -0700, Philip J. Hollenback wrote:
> I'm using zsh 3.1.5, and I'm trying to develop a completion for mutt.
> Here's what I currently have:
> 
> 
> mutt: if -f, -i, -a, or -H is given, complete files,
> # and if -f+ (or -f=, or -f +) is given, complete folders in
> # ~/mail.  Also complete options after -. 
> # Note that '-f =' can't be completed because '=' is grabbed by the
> # shell.  It needs to be protected with a '\', but I don't know how to
> # make the completion do that.
> # Don't complete users because I never mail anyone on my own system.
> compctl -x 's[+] c[-1,-f],s[-f+],s[-f=]' -W ~/mail -f \
>   - 's[-[fiaH]],C[-1,-[fiaH]]' -f \
>   - 's[-]' -k '(a b c e f F H i m n p R s v x y z Z h)' \
>   -- mutt
> 
> 
> I like to open mailboxes in my mail directory thusly:
> 
> # mutt -f =mailbox
> 
> That doesn't work, Apparently because the shell does something with
> words that start with '='.  I can't complete on =mailbox either,
> for the same reason.
	the EQUALS option, when set, tells the shell to interpret
# =foo
	as
# $(which foo)
	which is probably what is causing your problems.  if you don't
make use of that functionality, you can just unsetopt EQUALS and it
should work the way you would expect.

	-- sweth.

-- 
Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@xxxxxxx> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html";>*</a>



Messages sorted by: Reverse Date, Date, Thread, Author