Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [[ is being treated as a pattern in the command/reserved word position.
29.03.2015, 01:25, "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>:
> On Mar 28, 5:55pm, Eric Cook wrote:
> }
> } % print $ZSH_PATCHLEVEL; emulate sh -c '[[ a == a ]]'
> } zsh-5.0.7-362-gab40656
> } zsh: command not found: [[
> }
> } Did that behavior change?
>
> Aha. That makes more sense.
>
> The '[[' reserved word is handled a special kind of built-in alias [*]
> and the change to POSIX_ALIASES handling caused that to be disabled.
>
> This will take a bit of thought.
>
> [*] Not literally, but the alias expansion code is where '[[' is noted
> and the lexer changed into "parsing a conditional" state.
I would say that this is actually an expected behaviour: `posh -c '[[ a == a ]]'` will show `posh: [[: not found` because `[[` is not in POSIX. Similar error will be shown by dash.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author