Skip to content

Commit 1024ae8

Browse files
committed
'main': Add $last_arg for "lookbehind".
1 parent 5720d87 commit 1024ae8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ _zsh_highlight_main_highlighter_highlight_list()
422422
# Usually 'alias' but set to 'unknown-token' if any word expanded from
423423
# the alias would be highlighted as unknown-token
424424
# param_style is analogous for parameter expansions
425-
local alias_style param_style arg buf=$4 highlight_glob=true style
425+
local alias_style param_style last_arg arg buf=$4 highlight_glob=true style
426426
local in_array_assignment=false # true between 'a=(' and the matching ')'
427427
# in_alias is equal to the number of shifts needed until arg=args[1] pops an
428428
# arg from BUFFER and not added by an alias.
@@ -513,6 +513,7 @@ _zsh_highlight_main_highlighter_highlight_list()
513513
fi
514514

515515
while (( $#args )); do
516+
last_arg=$arg
516517
arg=$args[1]
517518
shift args
518519
if (( in_alias )); then

0 commit comments

Comments
 (0)