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

Re: 'while do done' hangs interactive zsh

Op 16-05-21 om 20:02 schreef Bart Schaefer:
Bash requires at least one pipeline in the do-LIST as well.

Is this worth making into an emulation-mode thing, i.e., adding a
couple of more conditions to my while-do-done patch?

My understanding of the emulation mode is that it attempts to make the changes necessary to eliminate incompatibilities with the POSIX standard. This does not require disabling extensions that are compatible with it.

The two empty command lists in 'while do done' are both straightforward syntax errors in POSIX, so the extension to allow them is not incompatible with the standard; there's no syntactic clash with the POSIX equivalent, 'while :; do :; done'. So I see no need for the emulation mode to disallow empty command lists.

AFAIK there's only one shell with a POSIX mode that attempts to disallow (almost) everything not specified by the standard, and that's yash.

||	modernish -- harness the shell
||	https://github.com/modernish/modernish
||	KornShell lives!
||	https://github.com/ksh93/ksh

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