Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: wrong error msg
- X-seq: zsh-users 22527
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: wrong error msg
- Date: Thu, 2 Mar 2017 08:47:45 -0800
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=brasslantern-com.20150623.gappssmtp.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=pecX7igS/kYyE9TvoYNtAF0GPS0S9G4FkBqyqDbPJuI=; b=LLKtMzKsMOwIzMEqBROxM1TAbSfo5pncfWSbPAy/I4hnDQhhtBZsfq+LxTUCgeQIk0 hVI6iH7sGQIT/KIdScSk1VOSXTT3oF/YXAnPH8OqYiyif6DvI7Xa1JjDpsHZLojPhz3M eCGqi9dnuEhDcUeCfLRLCsNTDh9RL8htFZt5f56KMToDa6n4cGzh7TJZNO4AG3lybHlf rkwc5q6Aoup6cAXzLwwRj+nMGneOTWE+ErLcItn/39wUx+IM1vvDK6rEm2+4lJ81wV+K kzQDY+WfmAFOkK2h6XRJwiBVvS6/ksGVty13TLYxZRkinmeU9u/dJ+liYwDQ3b+C+Wlo wH8g==
- In-reply-to: <c57f218a-e31a-41c5-3ec2-672627ae59aa@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author