unexpected tilde quoting change in version 4.3

2014-10-22 Thread idallen
Bash Version: 4.2 and 4.3 Description: I find this change in quoting from 4.2 to 4.3 odd, where double-quoted "~" used to be quoted (no expansion) and no longer works: Bash version 4.2.25(1)-release: $ x=foo $ y="${x/foo/\~}" # backslash is more than is needed $ echo "$y" \~

Re: behaviour change between 4.2/4.3 with tilde

2014-10-22 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/14, 4:20 AM, Hanno Böck wrote: > Hello, > > I experienced a somewhat unexpected behaviour change in bash 4.3 > comparing to 4.2. > > This is a reduced sample: > export a='x'; echo "${a/x/~}" > > On bash 4.3 this will result in the user's ho

Re: behaviour change between 4.2/4.3 with tilde

2014-10-22 Thread Andreas Schwab
Hanno Böck writes: > This is a reduced sample: > export a='x'; echo "${a/x/~}" > > On bash 4.3 this will result in the user's homedir path. On 4.2 this > will result in a ~. > If one wants to get a "~" char there seems no easy portable way to do > so. Using escaping with \~ works in 4.3, but not

Re: behaviour change between 4.2/4.3 with tilde

2014-10-22 Thread Greg Wooledge
On Wed, Oct 22, 2014 at 10:20:04AM +0200, Hanno Böck wrote: > export a='x'; echo "${a/x/~}" > > On bash 4.3 this will result in the user's homedir path. On 4.2 this > will result in a ~. > If one wants to get a "~" char there seems no easy portable way to do > so. Using escaping with \~ works in 4

behaviour change between 4.2/4.3 with tilde

2014-10-22 Thread Hanno Böck
Hello, I experienced a somewhat unexpected behaviour change in bash 4.3 comparing to 4.2. This is a reduced sample: export a='x'; echo "${a/x/~}" On bash 4.3 this will result in the user's homedir path. On 4.2 this will result in a ~. If one wants to get a "~" char there seems no easy portable w