Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: wrong error msg
Op 02-03-17 om 16:47 schreef Bart Schaefer:
> 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.
Perhaps it would be a useful feature to report the other two things, too.
yash does exactly that:
$ yash -c 'echo "Restore \"${previous?\"? (y/n)"'
yash -c:1: syntax error: the double quotation is not closed
yash -c:1: syntax error: `}' is missing
yash -c:1: syntax error: the double quotation is not closed
Would this be difficult to implement in zsh?
- M.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author