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

Re: Bug in parameter expansion with :- ?



On Tue, Jan 10, 2017, at 16:43, Peter Stephenson wrote:
> 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:--} 
> -

Yes I do! You are right - not a bug!

Ronald



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