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

Re: sound policy on global variables for "distributed" DWIM function



Greetings from a fellow UU-er!

On 22/07/15 at 02:37, Emanuel Berg wrote:
> So, do I put that data a global variable (and what is
> the best way to do that?), or do I have a function
> return that value and thus have two invocations but
> only one data item, or do I do something else?

Define a variable in your script, export an environmental var if it's
being sourced (beware name collisions, use a prefix), or even pass it as
an argument; it's up to you.

/jsks



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