Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: dumb completion question
- X-seq: zsh-users 11858
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: dumb completion question
- Date: Tue, 18 Sep 2007 18:00:28 +0100
- In-reply-to: <20070918151536.GA15903@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070918100642.GA20193@xxxxxxxxx> <20070918144612.GA12974@xxxxxxxxx> <200709181500.l8IF04Ft022305@xxxxxxxxxxxxxx> <20070918151536.GA15903@xxxxxxxxx>
Andy Spiegl wrote:
> > If you have extendedglob set, you need to qutoe '^clusters' or it will
> > expand to all files apart from one called clusters
>
> aaaargh!
>
> I didn't have it set but "setopt no_extendedglob" did help.
It's on by default in completion functions. I would get used to having
it on and quote accordingly. If you must turn it off, use
"setopt localoptions" or "emulate -L zsh" to prevent the change escaping
from the function.
> However, it still doesn't work correctly.
>
> % cssh <TAB>
> % cssh \(\ all\ www\ fire\ db\ mail\ web\ rest\)
Now I look, the problem is another quoting problem:
definedclusters="($(grep ^clusters $HOME/.csshrc | cut -d= -f2- 2>/dev/null))"
You're assigning the string starting "(" and ending ")", not an array.
In full, you want
definedclusters=($(grep '^clusters' $HOME/.csshrc | cut -d= -f2- 2>/dev/null))
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author