From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: <hzoli@VNET.IBM.COM> (Zoltan T. Hidvegi)
Cc: zsh-workers@math.gatech.edu
Subject: Re: Short loops?
Date: Wed, 26 Feb 1997 13:14:10 -0800 [thread overview]
Message-ID: <970226131410.ZM16925@candle.brasslantern.com> (raw)
In-Reply-To: <hzoli@VNET.IBM.COM> (Zoltan T. Hidvegi) "Re: Short loops?" (Feb 26, 2:27pm)
On Feb 26, 2:27pm, (Zoltan T. Hidvegi) wrote:
> Subject: Re: Short loops?
>
> Bart Schaefer wrote:
> > misleading. The /bin/sh manual can get away with `while LIST do LIST done'
> > because in /bin/sh the semicolon or newline at the end of a LIST is never
> > optional (the definition of LIST *includes* the trailing separator in the
> > /bin/sh manuals).
>
> Then the /bin/sh manual is wrong. if (true) then (echo foo) fi works fine
> in sh.
Hmm. Yup, you're right; I dug up my hardcopy of the 4.2 BSD `sh' man page.
I withdraw that objection.
Nevertheless, the point is that the "optional" terminator mentioned in the
definition of a "list" is not optional in the short forms. It *must* be
left out.
> > The doc could define a CLOSED construct to be any of (( )) [[ ]] ( ) { },
> > and define a CLOSEDLIST to be a LIST ending with a CLOSED but that is NOT
> > followed by the optional separator.
>
> Yes, but that would make the manual quite verbose repeating the same thing
> many times.
Why would that cause it to repeat itself more than it already does?
However, if something close to this text:
} If you interpret LIST as the longest string which is synactically a list
} than it is correct. In while true ; { echo foo } the longest possible list
} is true ; { echo foo }.
were added to the section on alternate forms, that would probably clarify
enough. Maybe also move the reserved words section above the alternate
forms, but that helps only when reading sequentially through the info.
Peter, how about adding something about this to the FAQ as well?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
next prev parent reply other threads:[~1997-02-26 21:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-26 2:13 Bart Schaefer
1997-02-26 16:10 ` Zoltan T. Hidvegi
1997-02-26 17:11 ` Bart Schaefer
1997-02-26 17:26 ` Zoltan T. Hidvegi
1997-02-26 19:09 ` Bart Schaefer
1997-02-26 19:27 ` Zoltan T. Hidvegi
1997-02-26 21:14 ` Bart Schaefer [this message]
1997-02-27 9:32 ` Peter Stephenson
1997-02-27 15:06 ` Zoltan T. Hidvegi
1997-02-27 18:16 ` Bart Schaefer
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=970226131410.ZM16925@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=hzoli@VNET.IBM.COM \
--cc=schaefer@nbn.com \
--cc=zsh-workers@math.gatech.edu \
/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).