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

autoload variables



Hi

We can autoload functions but is there a way to autoload variables?

My .zshenv and .zshrc files are getting longer and slower with more lists of exported variables that are useful but only needed in a few sessions. For instance, one variable is to identify the default uplink interface

   export UPIF=$(ip -4 r | sed -n -e '/^default/ s/^default.*dev //; s/ .*// p;q' )

Useful when I'm debugging the network but not needed otherwise.

Can I autoload these variables as needed?

   Anthony.


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