Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: parsing empty alternatives: case foo|) :;;
- X-seq: zsh-workers 41504
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: parsing empty alternatives: case foo|) :;;
- Date: Mon, 07 Aug 2017 15:58:56 +0100
- Cms-type: 201P
- In-reply-to: <CAH+w=7ZhywOm=W-jZqtGaA=fkHjsoOaBonhBrnEyyEYHzkaR3A@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20170807135641epcas3p4bc0a64f832ae7fcd76051ac198722045@epcas3p4.samsung.com> <20170807135559.odtceysgqn5qeqql@tarpaulin.shahaf.local2> <20170807152649.6a5e7d70@pwslap01u.europe.root.pri> <CAH+w=7ZhywOm=W-jZqtGaA=fkHjsoOaBonhBrnEyyEYHzkaR3A@mail.gmail.com>
A bit more experimentation reveals it's just the empty string that's
confusing it. If you put something between the | and the ) it works.
case foo in
foo|'') print Yes
;;
esac
works, also replacing '' by $empty works, but removing it completely doesn't.
I think this might be some fix-up code that got added for the old case
(nothing to do with pipes in that case).
Yes
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author