Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug with hidden prefixes
# schaefer@xxxxxxxxxxxxxxxx / 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author