Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15034 > unrolled thread

Re: Unset builtin not respecting single quotes / doing its own dereferencing

Started byChet Ramey <chet.ramey@case.edu>
First post2019-01-02 09:27 -0500
Last post2019-01-02 09:27 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Unset builtin not respecting single quotes / doing its own dereferencing Chet Ramey <chet.ramey@case.edu> - 2019-01-02 09:27 -0500

#15034 — Re: Unset builtin not respecting single quotes / doing its own dereferencing

FromChet Ramey <chet.ramey@case.edu>
Date2019-01-02 09:27 -0500
SubjectRe: Unset builtin not respecting single quotes / doing its own dereferencing
Message-ID<mailman.6695.1546439244.1284.bug-bash@gnu.org>
On 1/2/19 5:55 AM, bitbucket@mailbox.org wrote:

>    Bash Version: 4.4
>    Patch Level: 19
>    Release Status: release

>    Description:
>    When unsetting elements of an associative array, unset does not respect
>    the quoting rules, and does its own dereferencing. The behaviour
>    appears to be incorrect, or at least undocumented.

Yes. Associative array subscript expansion is consistent whether or not the
word has undergone shell expansion. This has been discussed many times in
the past.

There is a shell option in bash-5.0, `assoc_expand_once', that implements
the behavior you want.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web