Highlight keywords differently

This introduces a new variable $fish_color_keyword that will be used
to highlight keywords. If it's not defined, we fall back on
$fish_color_command as before.

An issue here is that most of our keywords have this weird duality of
also being builtins *if* executed without an argument or with
`--help`.

This means that e.g.

    if

is highlighted as a command until you start typing

    if t

and then it turns keyword.
This commit is contained in:
Fabian Homborg
2021-02-04 20:22:32 +01:00
parent 96f2de9d15
commit b3626d48e7
6 changed files with 19 additions and 10 deletions

View File

@@ -1398,6 +1398,7 @@ Variable Meaning
========================================== =====================================================================
``fish_color_normal`` default color
``fish_color_command`` commands like echo
``fish_color_keyword`` keywords like if - this falls back on command color if unset
``fish_color_quote`` quoted text like "abc"
``fish_color_redirection`` IO redirections like >/dev/null
``fish_color_end`` process separators like ';' and '&'