reproducer:
cd ~
mkdir MYDIR
cd MYDIR
echo "${PWD/#$HOME/~}"
Result of echo in 4.3:
/home/<user>/MYDIR
Result of echo in 4.2:
~/MYDIR
Is tilde expansion in 4.3 supposed to happen? I don't see any mention in
4.3's compat file, apart from
point 20 which was already present in COMPAT files for older versions.
Does this excerpt from the man page...
"
In each of the cases below, word is subject to tilde expansion,
parameter expansion, command substitution, and arithmetic
expansion.
"
...apply to string in ${parameter/pattern/string} as well? It would make
sense, since the other expansions worked on "string" in previous versions.
Thanks,
Ondrej