bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tilde expansion bug in associative array assignments?


From: Chet Ramey
Subject: Re: Tilde expansion bug in associative array assignments?
Date: Mon, 6 Feb 2023 16:31:55 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2/6/23 7:33 AM, Marco wrote:
I am seeing this potential regression on code checked out from https://git.savannah.gnu.org/git/bash.git at version ec8113b:

$ ./configure
$ make
$ echo "$BASH_VERSION"
5.2.15(1)-release

$ declare -A associative_array=([key]=~/Desktop)
$ ls -d "${associative_array[key]}"
ls: cannot access '~/Desktop': No such file or directory

Thanks for the report. The key should be tilde-expanded and the RHS of
the assignment should be tilde expanded as in assignment statements (there
is a subtle difference).

--
``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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]