Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I./include -I. -I./include -I./lib -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' -DSTANDARD_UTILS_PATH='/bin:/usr/bin:/sbin:/usr/sbin' -DSYS_BASHRC='/etc/bash/bashrc' -DSYS_BASH_LOGOUT='/etc/bash/bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -march=barcelona -mtune=barcelona -O2 -pipe uname output: Linux shanghai 3.12.13 #2 SMP PREEMPT Wed Mar 5 17:26:09 CET 2014 x86_64 Quad-Core AMD Opteron(tm) Processor 2389 AuthenticAMD GNU/Linux Machine Type: x86_64-pc-linux-gnu
Bash Version: 4.3
Patch Level: 0
Release Status: release
Description:
bash-4.3 seems to expand a "~" (tilde character) with full homepath in a
pattern substitution even when the variable is embraced by double quotes.
Repeat-By:
replace_with_tilde() { P="foo_bar" ; echo ${P/_/~} ; echo "${P/_/~}" ; }
bash-4.2.45:
~% replace_with_tilde
foo/home/polynomial-cbar
foo~bar
bash-4.3.0:
~% replace_with_tilde
foo/home/polynomial-cbar
foo/home/polynomial-cbar
signature.asc
Description: PGP signature
