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

Re: Bug with "return" from inside "if"



On Nov 5,  1:25pm, Bart Schaefer wrote:
} Subject: Bug with "return" from inside "if"
}
} % () { if return 1; then echo yes; else echo no; fi } && echo $?
} 0

Incidentally:

whatsupwithwhile () {
   while return 1
   do ;
   done
}

Both dash and zsh return an exit status of zero from whatsupwithwhile;
bash returns 1.

The change for this, if desirable, is less obvious than with execif(),
so I haven't dug into it yet.



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