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

Bug in parameter expansion with :- ?



This expands correctly to a '+':

      ${unset_variable:-+}

This however doesn't expand to a '-', but to the empty string:

    ${unset_variable:--}

I didn't find anything in the man page which would explain this
behaviour.

A note aside: Bash expands in the latter case to a dash (-). 

My zsh version:

zsh 5.1.1 (x86_64-unknown-cygwin)


Ronald



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