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

Why this doesn't work in zsh?



    Hi all :))

    I have part of a script that says something like:

    for parameter
    do
    ...
        option=${parameter%=*}
    ...
    done

    This assign the part before '=' to variable 'option', no more, no
less, and uses parameter expansion.

    It has to work with both bash and zsh, but zsh says, when the
assignment is done, '* not found'.

    The problem is the equalsign on the parameter expansion, now I
know, but, why? How can I fix this without making the script
incompatible with bash? What am I doing wrong?

    Thanks a lot :)
    Raúl



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