Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sound policy on global variables for "distributed" DWIM function
- X-seq: zsh-users 20336
- From: Joshua Krusell <js.shirin@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: sound policy on global variables for "distributed" DWIM function
- Date: Wed, 22 Jul 2015 15:55:19 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=ji/9xj5BO6MK64UKNot/KTM1fYAfba2e+z6IQiNGfUE=; b=fcUl6/aMzY5P0fJZpqzfT2g0er3H9K/kjO0h8gOmeFLRf/gyCR4DRSUDqyZA1/jIqs F4CBL1NVlKII3YRmdJVZ2ht57tqlNG+BWTMWoBrw+IsdNXMue4kkxQDkEiO08Vnw28B2 pODbutOHcAXP9Vs8/dlkonfwkChQ1Jtq+PxwE3c/bIomN5akt6jDlexbDLWgGcVPv9NC FF/whqqafit84bzLpWIXUXjXeshsdG9CUxU0taM9gb0rWvrCoVzYtLXjUxQAggEyGq2w unZ41qqn1RcTEqB0s3hv5cnPDDQDwZSjM8K11evOhhPrUbzeka32wPvr5tH7ELJNqkO3 XTcA==
- In-reply-to: <87fv4hm3ia.fsf@nl106-137-147.student.uu.se>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <87fv4hm3ia.fsf@nl106-137-147.student.uu.se>
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