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

Re: Bug in parameter expansion with :- ?



On Tue, 10 Jan 2017 16:35:00 +0100
Ronald Fischer <ynnor@xxxxx> wrote:

> This expands correctly to a '+':
> 
>       ${unset_variable:-+}
> 
> This however doesn't expand to a '-', but to the empty string:
> 
>     ${unset_variable:--}

You may be getting into confusions with options to builtins rather than
the expansion.

% print -r -- ${unset_variable:--} 
-

pws



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