Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[doogie@xxxxxxxxxxxxx: Bug#163237: zsh barfs on valid shell]
- X-seq: zsh-workers 17759
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: [doogie@xxxxxxxxxxxxx: Bug#163237: zsh barfs on valid shell]
- Date: Thu, 3 Oct 2002 16:43:41 -0400
- Cc: 163237-forwarded@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
This happens under emulate -R sh as well.
----- Forwarded message from Adam Heath <doogie@xxxxxxxxxxxxx> -----
adam@yakko:~$ for shell in ash bash zsh ksh; do echo -n "$shell:"; $shell -c 'case foo in (foo)echo foo;;(bar)echo bar;;esac';done
ash:foo
bash:foo
zsh:zsh: parse error near `foo'
ksh:foo
adam@yakko:~$ for shell in ash bash zsh ksh; do echo -n "$shell:"; $shell -c 'case foo in (foo) echo foo;;(bar) echo bar;;esac';done
ash:foo
bash:foo
zsh:foo
ksh:foo
http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#tag_02_10_02
Scroll down a bit to the actual grammer(surrounded by <pre>):
The case_item and case_item_ns show that there is no required space(or other
break char) between the ')' and the compound_list.
case_item_ns : pattern ')' linebreak
| pattern ')' compound_list linebreak
| '(' pattern ')' linebreak
| '(' pattern ')' compound_list linebreak
;
case_item : pattern ')' linebreak DSEMI linebreak
| pattern ')' compound_list DSEMI linebreak
| '(' pattern ')' linebreak DSEMI linebreak
| '(' pattern ')' compound_list DSEMI linebreak
----- End forwarded message -----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author