From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: wrong error msg
Date: Thu, 2 Mar 2017 08:47:45 -0800 [thread overview]
Message-ID: <170302084745.ZM15136@torch.brasslantern.com> (raw)
In-Reply-To: <c57f218a-e31a-41c5-3ec2-672627ae59aa@eastlink.ca>
On Mar 1, 6:20pm, Ray Andrews wrote:
} Subject: wrong error msg
}
} Probably not worth reporting but:
}
} echo "Restore \"${previous?\"? (y/n)"
}
} in a script reports: " unmatched " " whereas it should be an unmatched
} curly
The error message is correct. Try it outside of a script and you can
see what's happening:
torch% echo "Restore \"${previous?\"? (y/n)"
dquote braceparam dquote>
Note it's still waiting for you to close the inner quote, the brace,
and an outer quote. If end-of-file is received there, the first
error (unwinding the stack right to left) is unmatched quote. It
doesn't report the other two things that aren't matched.
This is because for example
echo "Outer quote ${var:="inner quote"} outer again"
is valid syntax -- you can include nested double quotes inside ${...}.
The result might be a "bad substitution" depending on what else is or
isn't inside the braces but that doesn't affect parsing the quotes.
next prev parent reply other threads:[~2017-03-02 16:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 2:20 Ray Andrews
2017-03-02 16:47 ` Bart Schaefer [this message]
2017-03-02 20:32 ` Ray Andrews
2017-03-02 23:14 ` Bart Schaefer
2017-03-02 23:37 ` Ray Andrews
2017-03-03 16:21 ` Bart Schaefer
2017-03-03 17:07 ` Ray Andrews
2017-03-04 14:00 ` Martijn Dekker
2017-03-04 15:33 ` Ray Andrews
2017-03-04 18:31 ` Bart Schaefer
2017-03-04 19:31 ` Ray Andrews
2017-03-04 22:55 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170302084745.ZM15136@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).