Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Incompatibility when Zsh invoked as 'sh'



    Hello zshworkers :))

    I don't know if this is an incompatibility or just bad scripting
;)), but when running the GNU libc (version 2.2.4) 'catchsegv'
script, Zsh complains. Zsh is being invoked as 'sh' here, I'm sure of
it, at least.

    The problem is a 'case' like this (abbreviated):

    case "$1" in
        [*)  ....
            ;;
        *)   ....
            ;;
    esac

    Well, the error is the '[*' pattern, which zsh says is a 'bat
pattern'. Bash treats it as the regex 'match an opening bracket and
anything after it', but zsh doesn't.

    Assuming that zsh is running in 'sh' compatibility mode (because
it is invoked 'sh'), it shouldn't treat '[' as an special character
(the problem is that the bracket must be quoted), should it?

    If Zsh is behaving well, the GNU libc people should be told about
quoting the offending char.

    Thanks a lot :)

    Raúl



Messages sorted by: Reverse Date, Date, Thread, Author