commit bash-20141212 snapshot

This commit is contained in:
Chet Ramey
2015-01-12 10:51:28 -05:00
parent 8742afefb5
commit ca4a0ec2ed
20 changed files with 11498 additions and 9 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
BUILD_DIR=/usr/local/build/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+9
View File
@@ -0,0 +1,9 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
export THIS_SH PATH
rm -f /tmp/xx
/bin/sh "$@"
File diff suppressed because one or more lines are too long
+21
View File
@@ -93,3 +93,24 @@ x="${z/#[^;][^;]}"
echo $x
x="${z/%[^;][^;]}"
echo $x
# post-bash-4.3 changes to make pattern replacement honor nocasematch variable
unset string
string=abcd
shopt -s nocasematch
echo ${string//A/z}
echo ${string//BC/x}
echo ${string//[BC]/x}
echo ${string//[bC]/x}
echo ${string//?/z}
LC_ALL=C
echo ${string//A/z}
echo ${string//BC/x}
echo ${string//[BC]/x}
echo ${string//[bC]/x}
echo ${string//?/z}
+17
View File
@@ -140,3 +140,20 @@ bix ()
}
foo
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
1
./redir11.sub: line 8: $a: Bad file descriptor
./redir11.sub: line 9: $(echo $a): Bad file descriptor
7
after: 42
./redir11.sub: line 24: echo: write error: Bad file descriptor
./redir11.sub: line 25: echo: write error: Bad file descriptor
./redir11.sub: line 26: $(a=4 foo): Bad file descriptor
./redir11.sub: line 27: $(a=4 foo): Bad file descriptor
./redir11.sub: line 30: $a: Bad file descriptor
./redir11.sub: line 31: $(echo $a): Bad file descriptor
./redir11.sub: line 39: $(ss= declare -i ss): ambiguous redirect
after: 42
a+=3
foo
foo
./redir11.sub: line 53: $(echo $a): Bad file descriptor
+2
View File
@@ -189,3 +189,5 @@ exec 9>&-
${THIS_SH} ./redir9.sub
${THIS_SH} ./redir10.sub
${THIS_SH} ./redir11.sub
+53
View File
@@ -0,0 +1,53 @@
# make sure redirections do not have access to the temporary environment, even
# in subshells and command substitutions
a=1
a=4 b=7 ss=4 echo $a
a=42
a=2 echo foo >&$a
a=2 echo foo >&$(echo $a)
foo()
{
local -i a
local v=0 x=1
a+=3
echo $a
}
a=4 b=7 ss=4 declare -i ss
a=4 b=7 foo
echo after: $a
unset a
a=4 echo foo >&$(foo)
a=1 echo foo >&$(foo)
a=1 echo foo >&$(a=4 foo)
echo foo >&$(a=4 foo)
a=42
a=2 echo foo >&$a
a=2 echo foo >&$(echo $a)
unset -f foo
foo()
{
local -i a
local v=0 x=1
a+=3
echo $a >&$(ss= declare -i ss)
}
a=4 b=7 foo
echo after: $a
unset a
typeset -i a
a=4 eval echo $(echo a+=3)
a=2
a=9 echo foo >&$(echo $a)
a=2
a=9 eval echo foo >&$(echo $a)
a=2
a=9 eval echo foo '>&$(echo $a)'