Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: parenthesis inside $(...)
- X-seq: zsh-workers 22202
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: parenthesis inside $(...)
- Date: Tue, 07 Feb 2006 20:15:51 +0000
- In-reply-to: Your message of "Tue, 07 Feb 2006 19:53:59 GMT." <20060207195359.GB5015@sc>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Stephane Chazelas wrote:
> $ zsh << \E
> heredoc> echo $(
> heredoc> case x in x) echo x;; esac
> heredoc> )
> heredoc> E
> zsh: parse error near `;;'
> zsh: parse error near `)'
Yes, it's known about (it's hinted at in the tip on page 314 of From
Bash to Z Shell: Conquering the Command Line, by Oliver Kiddle, Jerry
Peek and Peter Stephenson, Apress, ISBN 1 59059 376 6, in case anyone
hasn't got around to buying that yet) and the general feeling when this
came up here before was that it was pretty much inevitable.
The right way of constructing a nested case is with balanced
parentheses:
echo $(
case x in (x) echo x;; esac
)
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page still at http://www.pwstephenson.fsnet.co.uk/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author