Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: wrong error msg
On Mar 4, 2:00pm, Martijn Dekker wrote:
}
} $ 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?
It's messy. Zsh goes to some effort to *prevent* more than one error
from being reported, i.e., the routines that actually output the error
messages internally keep track of whether they've already been called
and skip printing if called again.
Anyway in zsh the unmatched quote is not the same one that yash is
reporting, if I'm interpreting the call stack correctly. Zsh has
hit the error while trying to close the very first opening quote,
having already abandoned the input of the "${' and the second quote.
So the error in zsh wouldn't change without completely rearranging
the lexer/parser.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author