On 1/14/15 9:09 AM, Ondrej Oprala wrote:
> reproducer:
> cd ~
> mkdir MYDIR
> cd MYDIR
> echo "${PWD/#$HOME/~}"
>
> Result of echo in 4.3:
> /home//MYDIR
>
> Result of echo in 4.2:
> ~/MYDIR
>
> Is tilde expansion in 4.3 supposed to happen?
Yes. It's a Posix change.
Look at http://austingrou
See:
- http://lists.gnu.org/archive/html/bug-bash/2014-10/msg00200.html
- http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00077.html
- http://lists.gnu.org/archive/html/bug-bash/2014-10/msg00202.html
On Wed, Jan 14, 2015 at 03:09:47PM +0100, Ondrej Oprala wrote:
> echo "${PWD/#$HOME/~}"
>
> Result of echo in 4.3:
> /home//MYDIR
imadev:~/tmp$ echo "$BASH_VERSION -- ${PWD/#$HOME/\~}"
4.3.30(5)-release -- ~/tmp
imadev:~/tmp$ bash-4.2 -c 'echo "$BASH_VERSION -- ${PWD/#$HOME/\~}"'
4.2.46(1)-relea
reproducer:
cd ~
mkdir MYDIR
cd MYDIR
echo "${PWD/#$HOME/~}"
Result of echo in 4.3:
/home//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 v