zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: unset "hash[key]" isn't matched with what "key" may be
Date: Tue, 9 Feb 2016 10:07:02 -0800	[thread overview]
Message-ID: <160209100702.ZM31203@torch.brasslantern.com> (raw)
In-Reply-To: <20160209161904.55615638@pwslap01u.europe.root.pri>

On Feb 9,  4:19pm, Peter Stephenson wrote:
}
} getindex() does parse_subcript(); later getarg() looks for tokens and
} if it finds any calls singsub(). "unset" doesn't have any of this
} sophistication.

Hmm.  For a normal array:

torch% x=3
torch% typeset 'foo[$x]'=1
torch% typeset -p foo
typeset -a foo=( '' '' 1 )
torch% unset 'foo[$x]'			<-- Note
torch% typeset -p foo
typeset -a foo=( '' '' '' )
torch% 

It didn't actually delete the element, but it did *something*.  (*Should*
it delete the element, as long as we're considering messing with this?)


  reply	other threads:[~2016-02-09 18:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-07 14:16 Sebastian Gniazdowski
2016-02-07 19:08 ` Peter Stephenson
2016-02-07 19:10   ` Sebastian Gniazdowski
2016-02-07 19:24     ` Peter Stephenson
2016-02-07 21:33 ` Bart Schaefer
2016-02-08  7:05   ` Bart Schaefer
2016-02-09  4:54     ` Bart Schaefer
2016-02-09  8:53       ` Peter Stephenson
2016-02-09 15:50         ` Bart Schaefer
2016-02-09 16:19           ` Peter Stephenson
2016-02-09 18:07             ` Bart Schaefer [this message]
2016-02-15  7:48   ` Sebastian Gniazdowski
2016-02-15 13:26     ` Nikolay Aleksandrovich Pavlov (ZyX)

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=160209100702.ZM31203@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).