main: Distinguish quoted/unquoted command substitutions

Closes #547.
This commit is contained in:
Matthew Martin 2018-10-13 08:14:42 -05:00
commit 47c2b7e185
7 changed files with 27 additions and 20 deletions

View file

@ -33,10 +33,10 @@ BUFFER=$'foo=$(echo bar) :'
expected_region_highlight=(
'1 15 assign' # foo=$(echo bar)
'5 15 default' # $(echo bar)
'5 15 command-substitution' # $(echo bar)
'5 6 command-substitution-delimiter' # $(
'5 15 command-substitution-unquoted' # $(echo bar)
'5 6 command-substitution-delimiter-unquoted' # $(
'7 10 builtin' # echo
'12 14 default' # bar
'15 15 command-substitution-delimiter' # )
'15 15 command-substitution-delimiter-unquoted' # )
'17 17 builtin' # :
)

View file

@ -33,8 +33,8 @@ BUFFER=$': foo$(echo bar'
expected_region_highlight=(
'1 1 builtin' # :
'3 15 default' # foo$(echo bar
'6 15 command-substitution' # $(echo bar
'6 7 command-substitution-delimiter' # $(
'6 15 command-substitution-unquoted' # $(echo bar
'6 7 command-substitution-delimiter-unquoted' # $(
'8 11 builtin' # echo
'13 15 default' # bar
)

View file

@ -53,8 +53,8 @@ expected_region_highlight=(
'55 58 double-quoted-argument-unclosed' # "lhu
'59 62 back-quoted-argument-delimiter' # \\\`
'64 112 default' # R\\'ly$(echo eh wag\\\`echo h\'nag\\\`'l' fht)agn
'70 109 command-substitution' # $(echo eh wag\\\`echo h\'nag\\\`'l' fht)
'70 71 command-substitution-delimiter' # $(
'70 109 command-substitution-unquoted' # $(echo eh wag\\\`echo h\'nag\\\`'l' fht)
'70 71 command-substitution-delimiter-unquoted' # $(
'72 75 builtin' # echo
'77 78 default' # eh
'80 104 default' # wag\\\`echo h\'nag\\\`'l'
@ -65,6 +65,6 @@ expected_region_highlight=(
'98 101 back-quoted-argument-delimiter' # \\\`
'102 104 single-quoted-argument' # 'l'
'106 108 default' # fht
'109 109 command-substitution-delimiter' # )
'109 109 command-substitution-delimiter-unquoted' # )
'113 113 unknown-token' # `
)

View file

@ -34,8 +34,8 @@ expected_region_highlight=(
'1 1 builtin' # :
'3 8 default' # "$(:)"
'3 8 double-quoted-argument' # "$(:)"
'4 7 command-substitution' # $(:)
'4 5 command-substitution-delimiter' # $(
'4 7 command-substitution-quoted' # $(:)
'4 5 command-substitution-delimiter-quoted' # $(
'6 6 builtin' # :
'7 7 command-substitution-delimiter' # )
'7 7 command-substitution-delimiter-quoted' # )
)

View file

@ -33,9 +33,9 @@ BUFFER=$': $(<foo)'
expected_region_highlight=(
'1 1 builtin' # :
'3 9 default' # $(<foo)
'3 9 command-substitution' # $(<foo)
'3 4 command-substitution-delimiter' # $(
'3 9 command-substitution-unquoted' # $(<foo)
'3 4 command-substitution-delimiter-unquoted' # $(
'5 5 redirection' # <
'6 8 default' # foo
'9 9 command-substitution-delimiter' # )
'9 9 command-substitution-delimiter-unquoted' # )
)