main: Stop highlighting alias as its first word too
Fixes #565 and #576
This commit is contained in:
@@ -33,6 +33,5 @@ alias x=$'# foo\npwd'
|
||||
BUFFER='x'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # x
|
||||
'1 1 comment' # x (#)
|
||||
'1 1 alias "issue #616"' # x
|
||||
)
|
||||
|
||||
@@ -33,6 +33,5 @@ alias x=$'# foo\npwd'
|
||||
BUFFER='x'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # x
|
||||
'1 1 unknown-token' # x (#)
|
||||
)
|
||||
|
||||
@@ -33,7 +33,6 @@ BUFFER='x file echo'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # x
|
||||
'1 1 builtin' # x (echo)
|
||||
'3 6 default' # file
|
||||
'8 11 builtin' # echo
|
||||
)
|
||||
|
||||
@@ -33,7 +33,6 @@ alias a=b b=c c=b
|
||||
BUFFER='a foo; :'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # a
|
||||
'1 1 unknown-token' # a (invalid alias loop)
|
||||
'3 5 default' # foo
|
||||
'6 6 commandseparator' # ;
|
||||
|
||||
@@ -35,7 +35,6 @@ BUFFER='a -u phy1729 echo; :'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # a
|
||||
'1 1 precommand' # a (sudo)
|
||||
'3 4 single-hyphen-option' # -u
|
||||
'6 12 default' # phy1729
|
||||
'14 17 builtin' # echo
|
||||
|
||||
@@ -34,7 +34,6 @@ BUFFER='a foo; :'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # a
|
||||
'1 1 builtin' # a (:)
|
||||
'3 5 default' # foo
|
||||
'6 6 commandseparator' # ;
|
||||
'8 8 builtin' # :
|
||||
|
||||
@@ -35,7 +35,6 @@ BUFFER='sdu phy1729 echo foo'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 3 alias' # sdu
|
||||
'1 3 precommand' # sdu (sudo)
|
||||
'5 11 default' # phy1729
|
||||
'13 16 commmand "issue #540"' # echo (not builtin)
|
||||
'18 20 default' # foo
|
||||
|
||||
@@ -36,7 +36,6 @@ BUFFER='sbu phy1729 echo foo'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 3 alias' # sbu
|
||||
'1 3 precommand' # sbu (sudo)
|
||||
'5 11 default' # phy1729
|
||||
'13 16 commmand "issue #540"' # echo (not builtin)
|
||||
'18 20 default' # foo
|
||||
|
||||
@@ -32,7 +32,6 @@ BUFFER='x foo echo bar'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # x
|
||||
'1 1 redirection' # x (>)
|
||||
'3 5 default' # foo
|
||||
'7 10 builtin' # echo
|
||||
'12 14 default' # bar
|
||||
|
||||
@@ -34,6 +34,5 @@ BUFFER='echo bar'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 4 alias' # echo
|
||||
'1 4 builtin' # echo
|
||||
'6 8 default' # bar
|
||||
)
|
||||
|
||||
@@ -32,6 +32,5 @@ alias x=/
|
||||
BUFFER=$'x'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 alias' # x
|
||||
'1 1 unknown-token "issue #202"' # x (/)
|
||||
)
|
||||
|
||||
@@ -48,7 +48,6 @@ fi
|
||||
expected_region_highlight+=(
|
||||
"9 9 commandseparator" # ;
|
||||
"11 16 alias" # alias1
|
||||
"11 16 command" # alias1 (ls)
|
||||
"17 17 commandseparator" # ;
|
||||
"19 24 unknown-token" # alias2
|
||||
)
|
||||
|
||||
@@ -32,6 +32,5 @@ BUFFER='x ls'
|
||||
|
||||
expected_region_highlight=(
|
||||
"1 1 alias" # x
|
||||
"1 1 precommand" # x (command)
|
||||
"3 4 command" # ls
|
||||
)
|
||||
|
||||
@@ -34,7 +34,6 @@ BUFFER='a;f;'
|
||||
|
||||
expected_region_highlight=(
|
||||
"1 1 alias" # a
|
||||
"1 1 builtin" # a (:)
|
||||
"2 2 commandseparator" # ;
|
||||
"3 3 function" # f
|
||||
"4 4 commandseparator" # ;
|
||||
|
||||
Reference in New Issue
Block a user