Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: dumb completion question
- X-seq: zsh-users 11854
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: dumb completion question
- Date: Tue, 18 Sep 2007 16:46:12 +0200
- In-reply-to: <20070918100642.GA20193@xxxxxxxxx>
- Kreccount: 1
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070918100642.GA20193@xxxxxxxxx>
I tried a little more, dug further into the completion docs and
found a solution:
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
# compdef cssh crsh
local definedclusters
definedclusters=(all www fire db mail web rest)
_arguments \
'-h[help]' \
...
'*:cssh clusters:($definedclusters)'
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
So far so good, but if I read in the variable dynamically
(which is what I want of course :-), like this:
definedclusters="($(grep ^clusters $HOME/.csshrc | cut -d= -f2- 2>/dev/null))"
then I get _very_ strange results: after pressing TAB I don't see the contents
of the variable definedclusters but stuff from my .Xdefaults and .zsh.history!
Anyone can explain this strange behavior to me please?
Thanks,
Andy.
--
cogito ergo sum, bibo ergo sum, cogito ergo bib, bibo ergo bib?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author