zsh-workers
 help / color / mirror / code / Atom feed
* spurious 'case' parse error
@ 2017-09-22 14:11 Martijn Dekker
  2017-09-22 15:42 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Martijn Dekker @ 2017-09-22 14:11 UTC (permalink / raw)
  To: Zsh hackers list

The following causes a spurious parse error in zsh:

case x in
(x)echo ok ;;
esac

Output:
test.zsh:2: parse error near `ok'

The cause is the lack of space after the ')'; that space should be
optional, but is mandatory in zsh.

Interestingly, this works:

case x in
x)echo ok ;;
esac

Confirmed in zsh 5.0.7 through current git. (I didn't test earlier
versions.)

- Martijn


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-23 22:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 14:11 spurious 'case' parse error Martijn Dekker
2017-09-22 15:42 ` Bart Schaefer
2017-09-22 16:59   ` Martijn Dekker
2017-09-23 17:16   ` Peter Stephenson

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).