better parser error messages; add -p option to source builtin

This commit is contained in:
Chet Ramey
2024-06-21 10:38:39 -04:00
parent dbb48b9786
commit 886e4e68be
17 changed files with 2057 additions and 1912 deletions
+2 -2
View File
@@ -157,7 +157,7 @@ bash: -c: line 1: unexpected token `EOF', expected `)'
bash: -c: line 2: syntax error: unexpected end of file
bash: -c: line 1: unexpected EOF while looking for `]]'
bash: -c: line 2: syntax error: unexpected end of file
bash: -c: line 1: syntax error in conditional expression
bash: -c: line 1: syntax error in conditional expression: unexpected token `]'
bash: -c: line 1: syntax error near `]'
bash: -c: line 1: `[[ ( -t X ) ]'
bash: -c: line 1: unexpected argument `&' to conditional unary operator
@@ -178,7 +178,7 @@ bash: -c: line 1: `[[ 4 > & ]]'
bash: -c: line 1: unexpected token `&' in conditional command
bash: -c: line 1: syntax error near `&'
bash: -c: line 1: `[[ & ]]'
bash: -c: line 1: conditional binary operator expected
bash: -c: line 1: unexpected token `7', conditional binary operator expected
bash: -c: line 1: syntax error near `7'
bash: -c: line 1: `[[ -Q 7 ]]'
bash: -c: line 1: unexpected argument `<' to conditional unary operator