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

spurious 'case' parse error



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



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