On Wed, Aug 09, 2006 at 10:45:42PM +0100, martin f krafft wrote:
> This is a bug because the following works in dash and it's not
> supposed to:
>
> eval $(while [ -n "${1:-}" ]; do
> case "$1" in
> [EMAIL PROTECTED]) echo remote="$1";;
> esac
> shift
> done)
>
> bash and zsh both fail as they correctly identify the ) to close the
> subshell. The right syntax would in this case be to use ([EMAIL PROTECTED]).
>
> In the interest of consistency, I suggest dash also should fail.
Hi martin,
after all dash parses the code correctly, and I personally think a
decent parser should well be able to identify the first ) not to be the
close bracket for the subshell. I understand that there's some
inconcistency, but would rather prefer the other shells to be adapted,
than to introduce a regression in dash.
If you don't agree, we can take this upstream.
Thanks, Gerrit.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]