mirror of
https://github.com/zsh-users/zsh-syntax-highlighting
synced 2024-12-11 22:15:23 +00:00
main: Only expand aliases in command position
This commit is contained in:
parent
99d7235c2b
commit
f46b148c52
@ -498,6 +498,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $this_word == *:start:* ]] && ! (( in_redirection )); then
|
||||||
# Expand aliases.
|
# Expand aliases.
|
||||||
# TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x'
|
# TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x'
|
||||||
# And then the entire 'alias' branch of the 'case' statement should
|
# And then the entire 'alias' branch of the 'case' statement should
|
||||||
@ -518,6 +519,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
arg=$reply[1]
|
arg=$reply[1]
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Analyse the current word.
|
# Analyse the current word.
|
||||||
if _zsh_highlight_main__is_redirection $arg ; then
|
if _zsh_highlight_main__is_redirection $arg ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user