Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: need help with compctl for NT
- X-seq: zsh-users 2412
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: Amol Deshpande <amold@xxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx (Zsh users list)
- Subject: Re: need help with compctl for NT
- Date: Sun, 27 Jun 1999 15:30:00 +0200
- In-reply-to: "Amol Deshpande"'s message of "Wed, 23 Jun 1999 12:23:11 DFT." <CDF457DA4ADAD11193E50008C724CC39043FD3AC@RED-MSG-10>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
Amol Deshpande wrote:
> I came up with a completion that seems to work:
>
> 'c[-1,stop]' -s "$(net.exe start|grep.exe -v ^T|sed.exe -ne
> 's/\([A-Z][a-zA
> -Z].*\)/"\1"/p')" \
>
>
> The only problem is that this completion only collects the output of "net
> start"
> on shell startup. I would like the list to be updated every time i run "net
> stop ..."
Simply change the double quotes around the $(...) to single quotes (and
anywhere else affected by the change in quotation marks, of course). With
the double quotes, the $(...) is getting evaluated straight away; with
single quotes it will be stored as a complete string, and expanded
separately each time. At least, it looks that simple...
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author