zsh-users
 help / color / mirror / code / Atom feed
* autoload variables
@ 2021-08-30 15:22 Anthony Fletcher
  2021-08-30 15:41 ` Roman Perepelitsa
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Anthony Fletcher @ 2021-08-30 15:22 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 681 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-09-03  6:53 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 15:22 autoload variables Anthony Fletcher
2021-08-30 15:41 ` Roman Perepelitsa
2021-08-30 16:40 ` René Neumann
2021-08-30 16:57   ` Anthony Fletcher
2021-08-30 19:30     ` Mikael Magnusson
2021-08-30 21:34     ` René Neumann
2021-08-30 21:46       ` Bart Schaefer
2021-08-31  0:10         ` Anthony Fletcher
2021-08-31 18:11           ` Roman Perepelitsa
2021-08-31 19:16             ` Bart Schaefer
2021-08-30 16:49 ` Bart Schaefer
2021-08-31 20:37 ` Marc Chantreux
2021-08-31 21:03   ` Roman Perepelitsa
2021-09-01  8:29     ` Marc Chantreux
2021-09-01  9:51       ` Roman Perepelitsa
2021-09-01 10:06         ` Marc Chantreux
2021-09-01 13:52           ` Bart Schaefer
2021-09-02 23:09         ` Anthony Fletcher
2021-09-03  0:07           ` Bart Schaefer
2021-09-03  6:52           ` Marc Chantreux

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).