From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: PATCH: `try' syntax
Date: Wed, 16 Jun 2004 10:21:57 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0406161014150.7130-100000@toltec.zanshin.com> (raw)
In-Reply-To: <15239.1087396405@trentino.logica.co.uk>
On Wed, 16 Jun 2004, Oliver Kiddle wrote:
> Bart wrote:
>
> > local -a +h reswords dis_reswords
> >
> > either the values aren't restored and/or assigning to these arrays
> > doesn't accomplish enable/disable.
>
> It's not odd if you look briefly at how everything in the parameters
> module is implemented. When a value is looked up it gets the
> information from the internal structure and returns it. Making local
> save and restore these internal structures would be fairly messy.
I'm pretty sure it works for _some_ variables; $functions in particular.
schaefer<501> x() {
> local -A +h functions
> print $#functions
> unfunction x
> print $#functions
> }
schaefer<502> x
502
501
schaefer<503> print $#functions
502
schaefer<504> x
502
501
Yep, works for $functions. Maybe it's because $reswords is not a hash.
(Why did we go with two arrays rather than a hash with resword keys and
enabled/disabled values? I've forgotten.)
next prev parent reply other threads:[~2004-06-16 17:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-14 11:23 Peter Stephenson
2004-06-14 12:58 ` Oliver Kiddle
2004-06-14 13:52 ` Peter Stephenson
2004-06-14 16:55 ` Oliver Kiddle
2004-06-14 17:27 ` Peter Stephenson
2004-06-14 18:14 ` Bart Schaefer
2004-06-15 10:31 ` Oliver Kiddle
2004-06-15 10:51 ` DervishD
2004-06-15 13:33 ` Peter Stephenson
2004-06-15 20:21 ` Bart Schaefer
2004-06-16 14:33 ` Oliver Kiddle
2004-06-16 17:21 ` Bart Schaefer [this message]
2004-06-18 11:05 ` PATCH: second go at `always' blocks Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0406161014150.7130-100000@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).