Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: In the tla completion function: "${(@P)var_cmd-*:FILE:_files}"
- X-seq: zsh-users 7897
- From: Haakon Riiser <haakon.riiser@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: In the tla completion function: "${(@P)var_cmd-*:FILE:_files}"
- Date: Fri, 20 Aug 2004 18:40:34 +0200
- In-reply-to: <Pine.LNX.4.61.0408200842470.27591@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040816213204.GA6795@s> <20040817005205.GB2869@xxxxxxx> <20040820085546.GA1174@s> <Pine.LNX.4.61.0408200842470.27591@xxxxxxxxxxxxxxxxxx>
[Bart Schaefer]
>> Hmm, strange that my shell gives 'bad substitution' when
>> var_cmd is not defined.
> So does Jason's, I'm sure. Jason's point is that var_cmd should
> NEVER BE "not defined" in the _tla function. It's defined at the
> point where it's declared, to be the second word on the command
> line.
OK, now I get it; the '-' fallback doesn't test var_cmd, but
the variable named by the expansion of $var_cmd:
% unset foo
% var_cmd=foo
% echo "${(@P)var_cmd-*:FILE:_files}"
*:FILE:_files
--
Haakon
Messages sorted by:
Reverse Date,
Date,
Thread,
Author