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

Re: More rabbit-holes with unset variables



On Thu, Nov 26, 2020 at 12:22 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> But if we decide to "fix" it for zsh, I don't think it'll break too much.

What kind of change do you envision? Will it change the output of this command?

  zsh -c 'f() { local -i x; echo $x; }; f'

If yes, it'll likely break a lot of code (it'll surely break my code).
If no, then the behavior of the following command should also stay
unchanged for consistency:

  zsh -c 'f() { local x; echo ${x-y}; }; f'

Roman.




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