zsh-workers
 help / color / mirror / code / Atom feed
From: Martijn Dekker <martijn@inlv.org>
To: zsh-workers@zsh.org
Subject: Re: 'while do done' hangs interactive zsh
Date: Sun, 16 May 2021 20:25:21 +0200	[thread overview]
Message-ID: <d6f015b1-4735-a681-47c3-582b0362965e@inlv.org> (raw)
In-Reply-To: <CAH+w=7YQqiev2TrWLg-5jGh+Kac2KVe-xQ6JLpJFmaPHr8wsMw@mail.gmail.com>

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


      reply	other threads:[~2021-05-16 18:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16  9:16 Arseny Maslennikov
2021-05-16 14:28 ` Bart Schaefer
2021-05-16 15:46   ` Bart Schaefer
2021-05-16 16:15     ` Mikael Magnusson
2021-05-16 16:22       ` Lawrence Velázquez
2021-05-16 17:47       ` Bart Schaefer
2021-05-16 18:23         ` Martijn Dekker
2021-05-16 19:59           ` Bart Schaefer
2021-05-16 20:34             ` Peter Stephenson
2021-05-16 21:19               ` [PATCH] volatile declarations (was Re: 'while do done' hangs interactive zsh) Bart Schaefer
2021-05-16 23:40                 ` Martijn Dekker
2021-05-16 16:43 ` 'while do done' hangs interactive zsh Stephane Chazelas
2021-05-16 18:02   ` Bart Schaefer
2021-05-16 18:25     ` Martijn Dekker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6f015b1-4735-a681-47c3-582b0362965e@inlv.org \
    --to=martijn@inlv.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).