Re: Subsequent `declare -fp` and `.` incorrectly restore function with here string with pattern substitution

2010-01-24 Thread Chet Ramey
On 1/24/10 11:46 AM, Arfrever Frehtes Taifersar Arahesis wrote:

> Bash Version: 4.0
> Patch Level: 37
> Release Status: release
> 
> Description:
>   Subsequent `declare -fp` and `.` incorrectly restore function with here 
> string with pattern substitution.
> 
> Repeat-By:
>   The following function is incorrectly restored:
>   here_string_test() {
>   : <<< "${var// /$'\n'}"
>   }
> 
>   Run the attached bash_test.sh script using this command:
>   env -i bash_test.sh

Thanks for the report.  In this case, the here-string does not need to be
requoted.

Chet



-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/




Subsequent `declare -fp` and `.` incorrectly restore function with here string with pattern substitution

2010-01-24 Thread Arfrever Frehtes Taifersar Arahesis
Configuration Information:
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. -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=core2 -O2 -pipe
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.0
Patch Level: 37
Release Status: release

Description:
    Subsequent `declare -fp` and `.` incorrectly restore function with here 
string with pattern substitution.

Repeat-By:
The following function is incorrectly restored:
here_string_test() {
: <<< "${var// /$'\n'}"
}

Run the attached bash_test.sh script using this command:
env -i bash_test.sh

-- 
Arfrever Frehtes Taifersar Arahesis


bash_test.sh
Description: application/shellscript


signature.asc
Description: This is a digitally signed message part.