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

Bug with unset variables



Hello,

It's obvious what this code should do:

  foo () {
    typeset var
    echo "var: '${var-other}'"
  }

However, zsh throws an empty string.

I tried different emulations, like ksh, and the same thing happens,
even though in ksh the right output (other) is shown.

I also tried with the other unnamable shell, and the correct output is shown.

Only zsh does something different.

My version is zsh 5.8.

Cheers.

-- 
Felipe Contreras




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