From: Roman Neuhauser <neuhauser@sigpipe.cz>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: bug with hidden prefixes
Date: Thu, 11 Jun 2015 17:53:11 +0200 [thread overview]
Message-ID: <20150611155311.GI15174@isis.sigpipe.cz> (raw)
In-Reply-To: <150611084558.ZM32001@torch.brasslantern.com>
# schaefer@brasslantern.com / 2015-06-11 08:45:58 -0700:
> On Jun 11, 2:09pm, Oliver Kiddle wrote:
> }
> } _foo() {
> } local ret=1
> } compadd -p /dev/ -M 'r:|/=* r:|=*' one two && ret=0
> } compadd three && ret=0
> } return ret
> } }
> } compdef _foo foo
> } foo /d<tab>
> }
> } This should insert /dev/ because it is an unambiguous prefix to both
> } possible matches: three can be ruled out. The two matches are listed, it
> } is just that the prefix is not inserted. Without either the matching
> } control or the third match being there, it works.
>
> Hmm. When I use this with "compadd three" removed, I get exactly the
> same behavior as with it included:
>
> torch% _foo() {
> local ret=1
> compadd -p /dev/ -M 'r:|/=** r:|=*' one two && ret=0
> : compadd three && ret=0
> return ret
> }
it's not actually removed, instead it clobbers ret with 0 no matter
what the previous compadd did.
--
roman
next prev parent reply other threads:[~2015-06-11 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-23 10:15 [PATCH] completion: Add FreeBSD's watch(1) Daniel Shahaf
2015-06-01 22:19 ` Oliver Kiddle
2015-06-11 12:09 ` bug with hidden prefixes Oliver Kiddle
2015-06-11 15:45 ` Bart Schaefer
2015-06-11 15:53 ` Roman Neuhauser [this message]
2015-06-11 16:35 ` Bart Schaefer
2015-06-11 11:24 ` [PATCH] completion: Add FreeBSD's watch(1) Daniel Shahaf
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=20150611155311.GI15174@isis.sigpipe.cz \
--to=neuhauser@sigpipe.cz \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/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).