Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Global arrays in widgets
- X-seq: zsh-users 21159
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Global arrays in widgets
- Date: Sun, 17 Jan 2016 09:37:25 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=Mg83OfL0g8WEEvpXdIOH3pE41A7NXR/1woEWFGBDdnE=; b=PoOXGyDMo+1MIAEkq0yFT4rxEKbqw64Npam4BioPKwOZ83XnTxVwJdb+eWnfQq7Db+ 3gUQx1bizmxWrdAfUMeXjmAQJfrORlw62nGHXFDWPsHalxR2eqzw1H8Pgkdj3EWacCtg 1wjGjlJdIE0VHAixmcWgsGtmzEeu0JB72AtNvHqVqPhRGDZru6tASwagxZhz5TAZEcFR tEAz9cqAKBW9xMkvv9r7KL0kEUT1nUjOcVSuEVf6XqwkLUuLeK0LOtdhvdHHqBt9E0I2 cnf4Dxhr0seRIMOYbUSK7XQGYB42itA4/BFeYjdY1OoQlHCWEwOSG1YQHsut4Wx4jJQ2 rmAw==
- In-reply-to: <CAKc7PVB5QJq-MrxucOoUFOLo_JEn04sJrROSWhhsAT_h6w2JjA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVB5QJq-MrxucOoUFOLo_JEn04sJrROSWhhsAT_h6w2JjA@mail.gmail.com>
On Jan 17, 1:18pm, Sebastian Gniazdowski wrote:
}
} typeset -g __zew_csw_index __zew_csw_left __zew_csw_right
} typeset -ga __zew_csw_found
[...]
} But the variable __zew_csw_found doesn't survive between calls. I
} tested various things and found that the only array that I can keep
} between calls is reply. Why?
Digging into the source from the link in your previous message, which
ideally I would not have had to do ... it's this:
typeset -U __zew_csw_found
This creates a new local with the same name as the global. Why not
just apply the -U at the first declaration? If for some reason you
don't want to do that, use
typeset -gU __zew_csw_found
to apply the -U to the global parameter.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author