new option to auto-close varassign redirs; fixed some new parser error reporting issues

This commit is contained in:
Chet Ramey
2021-06-28 10:26:43 -04:00
parent 03de84de4a
commit 3fb16fce32
19 changed files with 2507 additions and 2373 deletions
-1
View File
@@ -5,7 +5,6 @@ hi
hi
./comsub-eof3.sub: line 4: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
./comsub-eof3.sub: line 5: unexpected EOF while looking for matching `)'
./comsub-eof3.sub: line 5: unexpected EOF while looking for matching `)'
./comsub-eof4.sub: line 3: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
contents
./comsub-eof5.sub: line 4: warning: here-document at line 2 delimited by end-of-file (wanted `)')
-1
View File
@@ -286,4 +286,3 @@ argv[1] = <"A">
argv[1] = <A>
argv[1] = <A>
./posixexp.tests: line 97: unexpected EOF while looking for matching `}'
./posixexp.tests: line 98: syntax error: unexpected end of file
+3
View File
@@ -53,6 +53,7 @@ shopt -s promptvars
shopt -u restricted_shell
shopt -u shift_verbose
shopt -s sourcepath
shopt -u varredir_close
shopt -u xpg_echo
--
shopt -u huponexit
@@ -112,6 +113,7 @@ shopt -u nullglob
shopt -u progcomp_alias
shopt -u restricted_shell
shopt -u shift_verbose
shopt -u varredir_close
shopt -u xpg_echo
--
autocd off
@@ -154,6 +156,7 @@ nullglob off
progcomp_alias off
restricted_shell off
shift_verbose off
varredir_close off
xpg_echo off
--
set +o allexport
+1
View File
@@ -98,3 +98,4 @@ swizzle ()
exec {stdin}<&${fd[0]}-;
exec {stdout}>&${fd[1]}-
}
./vredir8.sub: line 12: $fd: Bad file descriptor
+1
View File
@@ -57,5 +57,6 @@ ${THIS_SH} ./vredir5.sub
${THIS_SH} ./vredir6.sub
${THIS_SH} ./vredir7.sub
${THIS_SH} ./vredir8.sub
exit 0
+13
View File
@@ -0,0 +1,13 @@
# test varredir_close
: {fd}<>/dev/null
echo redir 1 >&$fd
exec {fd}>&-
shopt -s varredir_close
: {fd}<>/dev/tty
echo redir 2 >&$fd
exec {fd}>&-