From 7d41cd8c37232fb86e75fec705b3fda2b5ecb562 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 21 Feb 2016 02:53:36 -0500 Subject: Remove quotes in here-document delimiters --- 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 <