From: Greg Klanderman <gak@klanderman.net>
To: zsh-workers@sunsite.dk
Subject: Re: completion bug: treats substitution of unset parameter as empty string
Date: Wed, 09 Sep 2009 00:10:44 -0400 [thread overview]
Message-ID: <m3pra0oj0b.fsf@klanderman.net> (raw)
In-Reply-To: <19056.37899.24683.999959@gargle.gargle.HOWL> (Greg Klanderman's message of "Wed, 29 Jul 2009 14:25:15 -0400")
>>>>> On July 29, 2009 -- Greg Klanderman <gak@klanderman.net> 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
next prev parent reply other threads:[~2009-09-09 4:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-29 18:25 Greg Klanderman
2009-09-09 4:10 ` Greg Klanderman [this message]
2009-09-10 9:26 ` Peter Stephenson
2009-09-10 14:30 ` Greg Klanderman
2009-09-10 14:40 ` Peter Stephenson
2009-09-10 15:23 ` Greg Klanderman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3pra0oj0b.fsf@klanderman.net \
--to=gak@klanderman.net \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).