mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
command word: Avoid unknown-token highlighting whilst inputting the command word.
Adds the 'command-being-input' highlight. Builds on top of the 'command-word-separator-v1' branch from PR #243.
This commit is contained in:
parent
09c4114eb9
commit
e13c86dfc2
3 changed files with 7 additions and 1 deletions
|
|
@ -40,6 +40,7 @@
|
|||
: ${ZSH_HIGHLIGHT_STYLES[precommand]:=fg=green,underline}
|
||||
: ${ZSH_HIGHLIGHT_STYLES[commandseparator]:=none}
|
||||
: ${ZSH_HIGHLIGHT_STYLES[hashed-command]:=fg=green}
|
||||
: ${ZSH_HIGHLIGHT_STYLES[command-being-typed]:=fg=yellow,underline}
|
||||
: ${ZSH_HIGHLIGHT_STYLES[path]:=underline}
|
||||
: ${ZSH_HIGHLIGHT_STYLES[path_prefix]:=underline}
|
||||
: ${ZSH_HIGHLIGHT_STYLES[globbing]:=fg=blue}
|
||||
|
|
@ -347,6 +348,8 @@ _zsh_highlight_main_highlighter()
|
|||
else
|
||||
if _zsh_highlight_main_highlighter_check_path; then
|
||||
style=$ZSH_HIGHLIGHT_STYLES[path]
|
||||
elif (( ${#BUFFER} == $end_pos )); then
|
||||
style=$ZSH_HIGHLIGHT_STYLES[command-being-typed]
|
||||
else
|
||||
style=$ZSH_HIGHLIGHT_STYLES[unknown-token]
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue