[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Assignment with colons *should* be tilde expanded in POSIX mode
From: |
Anders Kaseorg |
Subject: |
Assignment with colons *should* be tilde expanded in POSIX mode |
Date: |
Mon, 1 Nov 2021 22:37:06 +0000 |
As you know, POSIX requires tilde expansion following an an unquoted colon in
an assignment [1]. A bug was reported [2] against bash 5.1-alpha that the
tildes in
$ echo foo=~:~
foo=~:~
should not be expanded in POSIX mode, because this is not an assignment. That
was fixed in 5.1-beta. However, that fix also seems to have broken the actual
assignment
$ foo=~:~
$ echo "$foo"
/home/anders:~
where both tildes should be expanded in POSIX mode, because this is an
assignment.
5.0.18 and 5.1-alpha gave the expected /home/anders:/home/anders, while
5.1-beta, 5.1.8, and the devel branch incorrectly give /home/anders:~.
Anders
[1]
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_01
[2] https://lists.gnu.org/archive/html/bug-bash/2020-07/msg00072.html
- Assignment with colons *should* be tilde expanded in POSIX mode,
Anders Kaseorg <=