diff options
-rw-r--r-- | parsing/lexer.sh | 3 | ||||
-rw-r--r-- | parsing/parse.sh | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/parsing/lexer.sh b/parsing/lexer.sh index d559274..aa72ec1 100644 --- a/parsing/lexer.sh +++ b/parsing/lexer.sh @@ -195,7 +195,8 @@ next_here() here="${here_queue%%${RS}*}" here_strip_tabs="${here%%${US}*}" here_end="${here%${US}*}" - here_end="${here_end#*${US}}" + here_end="$(printf '%s' "${here_end#*${US}}" | \ + sed 's/\\//g; s/"//g; s/'\''//g;')" # Stupid Vim: ')" here_escaped="${here##*${US}}" here_queue="${here_queue#*${RS}}" here_awaiting_word=false diff --git a/parsing/parse.sh b/parsing/parse.sh index 63b2cba..ddcdd97 100644 --- a/parsing/parse.sh +++ b/parsing/parse.sh @@ -627,7 +627,7 @@ try() } #try '"foo bar" && $baz || qux' '${quux%uux quuux' -try '"foo bar" && $baz || qux' '${quux%uux } quuux' +#try '"foo bar" && $baz || qux' '${quux%uux } quuux' #try 'foo ${bar}' #try 'foo ${#bar}' #try 'foo ${bar#baz}' @@ -659,5 +659,5 @@ try '"foo bar" && $baz || qux' '${quux%uux } quuux' #try 'foo <<EOF' 'bar' 'EOF' #try 'foo <<-EOF' "${HT}bar" "${HT}EOF" #try 'foo <<EOF' '$(bar)' 'EOF' -#try 'foo <<E"O"F' '$(bar)' 'E"O"F' # BUG +try 'foo <<E"O"F' '$(bar)' 'EOF' #try 'foo <<EOF1; bar <<EOF2' 'baz' 'EOF1' 'qux' 'EOF2' |