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

typeset -g (was Re: rsync --progress stops completion)



On Sep 21, 11:35pm, Yuri D'Elia wrote:
}
} Can you explain a bit in more detail what is the difference between an
} undeclared global and typeset -g? The manpage wasn't clear to me.

There are only two:

The WARN_CREATE_GLOBAL option will trigger on the first assignment to
an undeclared global, so for best behavior it should be declared.

In the absence of -g, typeset inside a function will create local, so
-g is needed if you want to apply other flags such as -a or -H.



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