Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A serious bug in execution – where to debug?



On Tue, 30 Jul 2019 at 23:02, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>> On Tue, 30 Jul 2019 at 20:28, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> > If you change the [[ ... ]] && ... to an if/then, does the behavior change?
>> > If you add a "return" or "return $?" at the end of the function, does it change?
>>
>> a) yes, the problem cancels with if-then
>> b) no, adding one of the return's doesn't change the behavior
>
> I think Bart solved it. Do you have `emulate -L zsh` in your `zle` function?

No, but adding it helps. Any emulation (sh, ksh) does. Aah, so this is
the errreturn option set within your plugin! and the if-then was
setting the return code to 0. A very interesting situation, having
your code called in foreign context, to know what options to defend
from.



Messages sorted by: Reverse Date, Date, Thread, Author