aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bashast/bashast.g2
-rw-r--r--bashast/gunit/expansions.gunit2
-rw-r--r--scripts/command_execution.bash1
3 files changed, 4 insertions, 1 deletions
diff --git a/bashast/bashast.g b/bashast/bashast.g
index 98da5e7..700f865 100644
--- a/bashast/bashast.g
+++ b/bashast/bashast.g
@@ -746,6 +746,8 @@ expansion_base
| (ESC TICK) => ESC TICK -> TICK
| (ESC DOLLAR) => ESC DOLLAR -> DOLLAR
| (brace_expansion) => brace_expansion
+ | (DOLLAR SINGLE_QUOTED_STRING_TOKEN) => DOLLAR SINGLE_QUOTED_STRING_TOKEN
+ -> ^(ANSI_C_QUOTING SINGLE_QUOTED_STRING_TOKEN)
| .;
all_expansions
diff --git a/bashast/gunit/expansions.gunit b/bashast/gunit/expansions.gunit
index 543012e..39acfa9 100644
--- a/bashast/gunit/expansions.gunit
+++ b/bashast/gunit/expansions.gunit
@@ -30,4 +30,4 @@ done" -> (LIST (COMMAND (for each (STRING (COMMAND_SUB `ls |grep output`)) (LIST
"wc <(cat /usr/share/dict/linux.words)" -> (LIST (COMMAND (STRING wc) (PROCESS_SUBSTITUTION < (LIST (COMMAND (STRING cat) (STRING / usr / share / dict / linux . words))))))
all_expansions:
-"abc $(ab) ${ab} $((ab)) `ab` \"ab\" 'ab'" -> (STRING abc (COMMAND_SUB $(ab)) (VAR_REF ab) (ARITHMETIC_EXPRESSION (ARITHMETIC (VAR_REF ab))) (COMMAND_SUB `ab`) (DOUBLE_QUOTED_STRING ab) 'ab')
+"$'abc' abc $(ab) ${ab} $((ab)) `ab` \"ab\" 'ab'" -> (STRING (ANSI_C_QUOTING 'abc') abc (COMMAND_SUB $(ab)) (VAR_REF ab) (ARITHMETIC_EXPRESSION (ARITHMETIC (VAR_REF ab))) (COMMAND_SUB `ab`) (DOUBLE_QUOTED_STRING ab) 'ab')
diff --git a/scripts/command_execution.bash b/scripts/command_execution.bash
index 06d6676..615b13f 100644
--- a/scripts/command_execution.bash
+++ b/scripts/command_execution.bash
@@ -84,3 +84,4 @@ variable=a
echo "${!variable// /_}"
echo "${!#// /_}"
echo "${!1// /_}"
+echo "${!variable// /$'\n'}"