Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion bug: treats substitution of unset parameter as empty string
- X-seq: zsh-workers 27253
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: completion bug: treats substitution of unset parameter as empty string
- Date: Wed, 09 Sep 2009 00:10:44 -0400
- In-reply-to: <19056.37899.24683.999959@xxxxxxxxxxxxxxxxxx> (Greg Klanderman's message of "Wed, 29 Jul 2009 14:25:15 -0400")
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <19056.37899.24683.999959@xxxxxxxxxxxxxxxxxx>
- Reply-to: gak@xxxxxxxxxxxxxx
>>>>> On July 29, 2009 -- Greg Klanderman <gak@xxxxxxxxxxxxxx> wrote:
> % unset Q
> % ls $Q/ <tab>
> lists completions in '/' rather than beep because there are no
> completions.
> I do have the 'nounset' option set, though I think this should
> give an error / no completions either way, as it did with the
> old compctl system.
OK, so just this line in _path_files needs 'setopt nounset':
| eval 'realpath=${(e)~linepath}' 2>/dev/null
Is the best way to do that to use an anonymous function:
| function {
| setopt localoptions nounset
| eval 'realpath=${(e)~linepath}' 2>/dev/null
| }
or is this paradigm which I see in a few places preferred:
| setopt nounset
| eval 'realpath=${(e)~linepath}' 2>/dev/null
| setopt unset
How exactly is the default set of shell options arrived at for the
evaluation of completion functions? My own setopts do not seem to
effect the completion functions.. how is that?
thanks,
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author