[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tilde expansion differences between 4.3 and 4.2
From: |
Ondrej Oprala |
Subject: |
Tilde expansion differences between 4.3 and 4.2 |
Date: |
Wed, 14 Jan 2015 15:09:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
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
- Tilde expansion differences between 4.3 and 4.2,
Ondrej Oprala <=