Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#236350: zsh: _prefix completer broken?
- X-seq: zsh-workers 19546
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#236350: zsh: _prefix completer broken?
- Date: Sat, 6 Mar 2004 17:59:20 +0000
- In-reply-to: <1040306173839.ZM5329@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E1AzKUu-0003tz-00@xxxxxxxxxxxxxxxxxxxxxxxxx> <20040306013513.GA25297@xxxxxxxxxxx> <20040306160540.GW19320@xxxxxxxxxxx> <1040306173839.ZM5329@xxxxxxxxxxxxxxxxxxxxxxx>
On Mar 6, 5:38pm, Bart Schaefer wrote:
} Subject: Re: Bug#236350: zsh: _prefix completer broken?
}
} schaefer<504> egrefoo
} No matches for `external command', `builtin command', `shell function',
} `alias', `suffix alias', `reserved word', `job', `parameter', `local
} directory', `directory in cdpath', or `corrections'
}
} : _main_complete:159:for for elif-then; ret=0
} : _main_complete:160:for for elif-then; break 2 <-- doesn't happen in 4.0.7
} : _main_complete:169; curcontext=:::
} : _main_complete:170; nm=0
This looks like it could be a serious problem. The code in question is
this:
if [[ -n "$call" ]]; then
if "${(@)argv[3,-1]}"; then
ret=0
break 2
fi
elif "$tmp"; then
ret=0
break 2
fi
_approximate is being called as "$tmp" here. It returns 1, but the
test succeeds and breaks out of the loop, because _approximate uses
"trap 'unfunction compadd' EXIT INT" and the return code of the trap
is being propagated rather than the return code of _approximate.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author