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

Re: dumb completion question



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