Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: unset "hash[key]" isn't matched with what "key" may be
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?)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author