Remove useless check from Zsh themes
This commit is contained in:
parent
a8eb177896
commit
ec93b23f8f
@ -4,50 +4,47 @@
|
||||
function()
|
||||
{
|
||||
|
||||
zsh_theme_colours[cmd]="213" # light pink
|
||||
zsh_theme_colours[word]="172" # orange
|
||||
zsh_theme_colours[misc]="81" # cyan
|
||||
zsh_theme_colours[variable]="204" # salmon
|
||||
zsh_theme_colours[quote]="76" # green
|
||||
zsh_theme_colours[comment]="60" # dark violet
|
||||
zsh_theme_colours[error]="207" # bright pink
|
||||
|
||||
if [[ -n "${ZSH_HIGHLIGHT_VERSION}" ]]; then
|
||||
zsh_theme_colours[cmd]="213" # light pink
|
||||
zsh_theme_colours[word]="172" # orange
|
||||
zsh_theme_colours[misc]="81" # cyan
|
||||
zsh_theme_colours[variable]="204" # salmon
|
||||
zsh_theme_colours[quote]="76" # green
|
||||
zsh_theme_colours[comment]="60" # dark violet
|
||||
zsh_theme_colours[error]="207" # bright pink
|
||||
ZSH_HIGHLIGHT_STYLES[command]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[function]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[alias]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[builtin]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[precommand]="fg=${zsh_theme_colours[cmd]},underline"
|
||||
ZSH_HIGHLIGHT_STYLES[arg0]="fg=${zsh_theme_colours[cmd]}"
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[command]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[function]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[alias]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[builtin]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[precommand]="fg=${zsh_theme_colours[cmd]},underline"
|
||||
ZSH_HIGHLIGHT_STYLES[arg0]="fg=${zsh_theme_colours[cmd]}"
|
||||
ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=${zsh_theme_colours[word]}"
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=${zsh_theme_colours[word]}"
|
||||
ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=${zsh_theme_colours[misc]}"
|
||||
ZSH_HIGHLIGHT_STYLES[globbing]="fg=${zsh_theme_colours[misc]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]="fg=${zsh_theme_colours[misc]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]="fg=${zsh_theme_colours[misc]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]="fg=${zsh_theme_colours[misc]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[redirection]="fg=${zsh_theme_colours[misc]}"
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-1]='fg=${zsh_theme_colours[misc]}'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-2]='fg=${zsh_theme_colours[misc]}'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-3]='fg=${zsh_theme_colours[misc]}'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-4]='fg=${zsh_theme_colours[misc]}'
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=${zsh_theme_colours[misc]}"
|
||||
ZSH_HIGHLIGHT_STYLES[globbing]="fg=${zsh_theme_colours[misc]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]="fg=${zsh_theme_colours[misc]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]="fg=${zsh_theme_colours[misc]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]="fg=${zsh_theme_colours[misc]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[redirection]="fg=${zsh_theme_colours[misc]}"
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-1]='fg=${zsh_theme_colours[misc]}'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-2]='fg=${zsh_theme_colours[misc]}'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-3]='fg=${zsh_theme_colours[misc]}'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-4]='fg=${zsh_theme_colours[misc]}'
|
||||
ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]="fg=${zsh_theme_colours[variable]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]="fg=${zsh_theme_colours[variable]}"
|
||||
ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=${zsh_theme_colours[variable]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=${zsh_theme_colours[variable]}"
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]="fg=${zsh_theme_colours[variable]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]="fg=${zsh_theme_colours[variable]}"
|
||||
ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=${zsh_theme_colours[variable]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=${zsh_theme_colours[variable]}"
|
||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=${zsh_theme_colours[quote]}"
|
||||
ZSH_HIGHLIGHT_STYLES[comment]="fg=${zsh_theme_colours[comment]}"
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[comment]="fg=${zsh_theme_colours[comment]}"
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]="fg=${zsh_theme_colours[error]},bold,standout"
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-error]="fg=${zsh_theme_colours[error]},bold,standout"
|
||||
fi
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]="fg=${zsh_theme_colours[error]},bold,standout"
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-error]="fg=${zsh_theme_colours[error]},bold,standout"
|
||||
|
||||
}
|
||||
|
@ -21,85 +21,82 @@ _urc[strings]="36" # #17ad98
|
||||
_urc[regex]="39" # #149bda
|
||||
_urc[builtins]="99" # #7864fa
|
||||
_urc[keywords]="135" # #b33ce8
|
||||
# _urc[error]="164" # #d41acd
|
||||
# _urc[deprecated]="#d41acd"
|
||||
|
||||
if [[ -n "${ZSH_HIGHLIGHT_VERSION}" ]]; then
|
||||
# <https://github.com/zsh-users/zsh-syntax-highlighting/tree/master/highlighters/main>
|
||||
# <https://github.com/zsh-users/zsh-syntax-highlighting/tree/master/highlighters/main>
|
||||
typeset -gA ZSH_HIGHLIGHT_STYLES
|
||||
|
||||
typeset -gA ZSH_HIGHLIGHT_STYLES
|
||||
# Builtins
|
||||
ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=${_urc[keywords]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[builtin]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[function]="fg=${_urc[builtins]},bold"
|
||||
# ZSH_HIGHLIGHT_STYLES[hashed-command]="fg=green,standout" # ???
|
||||
ZSH_HIGHLIGHT_STYLES[alias]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[suffix-alias]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[global-alias]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[autodirectory]="fg=${_urc[builtins]}"
|
||||
|
||||
# Built ins
|
||||
ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=${_urc[keywords]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[builtin]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[function]="fg=${_urc[builtins]},bold"
|
||||
# ZSH_HIGHLIGHT_STYLES[hashed-command]="fg=green,standout" # ???
|
||||
ZSH_HIGHLIGHT_STYLES[alias]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[suffix-alias]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[global-alias]="fg=${_urc[builtins]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[autodirectory]="fg=${_urc[builtins]}"
|
||||
# Commands
|
||||
ZSH_HIGHLIGHT_STYLES[command]="fg=${_urc[commands]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[precommand]="fg=${_urc[builtins]},underline"
|
||||
ZSH_HIGHLIGHT_STYLES[arg0]="fg=${_urc[commands]}"
|
||||
ZSH_HIGHLIGHT_STYLES[process-substitution]="fg=${_urc[commands]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-quoted]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-unquoted]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]="fg=${_urc[builtins]}"
|
||||
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]="fg=${_urc[builtins]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]="fg=${_urc[regex]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-unclosed]="fg=${_urc[regex]},bold"
|
||||
|
||||
# # Commands
|
||||
ZSH_HIGHLIGHT_STYLES[command]="fg=${_urc[commands]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[precommand]="fg=${_urc[builtins]},underline"
|
||||
ZSH_HIGHLIGHT_STYLES[arg0]="fg=${_urc[commands]}"
|
||||
ZSH_HIGHLIGHT_STYLES[process-substitution]="fg=${_urc[commands]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-quoted]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-unquoted]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]="fg=${_urc[builtins]}"
|
||||
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]="fg=${_urc[builtins]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]="fg=${_urc[regex]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-unclosed]="fg=${_urc[regex]},bold"
|
||||
# Punctuation
|
||||
ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]="fg=${_urc[variables]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-quoted]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-unquoted]="fg=${_urc[variables]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]="fg=${_urc[commands]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]="fg=${_urc[regex]},bold"
|
||||
|
||||
## Punctuation
|
||||
ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]="fg=${_urc[variables]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-quoted]="fg=${_urc[variables]}"
|
||||
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-unquoted]="fg=${_urc[variables]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]="fg=${_urc[commands]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]="fg=${_urc[regex]},bold"
|
||||
# Text, quotes
|
||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=${_urc[strings]}"
|
||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=${_urc[strings]}"
|
||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[rc-quote]="fg=${_urc[strings]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=${_urc[regex]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]="fg=${_urc[strings]}"
|
||||
|
||||
## Text, quotes
|
||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=${_urc[strings]}"
|
||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=${_urc[strings]}"
|
||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[rc-quote]="fg=${_urc[strings]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=${_urc[regex]}"
|
||||
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]="fg=${_urc[strings]}"
|
||||
# Variables, constants
|
||||
ZSH_HIGHLIGHT_STYLES[assign]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[named-fd]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[numeric-fd]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]="fg=${_urc[variables]},bold"
|
||||
|
||||
# Variables, constants
|
||||
ZSH_HIGHLIGHT_STYLES[assign]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[named-fd]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[numeric-fd]="fg=${_urc[constants]}"
|
||||
ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]="fg=${_urc[variables]},bold"
|
||||
# Paths
|
||||
ZSH_HIGHLIGHT_STYLES[path]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[path_pathseparator]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[path_prefix]="fg=${_urc[dark]}"
|
||||
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]="fg=${_urc[dark]}"
|
||||
|
||||
# Paths
|
||||
ZSH_HIGHLIGHT_STYLES[path]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[path_pathseparator]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[path_prefix]="fg=${_urc[dark]}"
|
||||
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]="fg=${_urc[dark]}"
|
||||
# Misc
|
||||
ZSH_HIGHLIGHT_STYLES[default]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[comment]="fg=${_urc[comments]},italic"
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]="standout"
|
||||
ZSH_HIGHLIGHT_STYLES[globbing]="fg=${_urc[default]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=${_urc[builtins]}"
|
||||
ZSH_HIGHLIGHT_STYLES[redirection]="fg=${_urc[light]}"
|
||||
ZSH_HIGHLIGHT_STYLES[cursor]='standout'
|
||||
|
||||
# Misc
|
||||
ZSH_HIGHLIGHT_STYLES[default]="fg=${_urc[default]}"
|
||||
ZSH_HIGHLIGHT_STYLES[comment]="fg=${_urc[comments]},italic"
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]="standout"
|
||||
ZSH_HIGHLIGHT_STYLES[globbing]="fg=${_urc[default]},bold"
|
||||
ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=${_urc[builtins]}"
|
||||
ZSH_HIGHLIGHT_STYLES[redirection]="fg=${_urc[light]}"
|
||||
ZSH_HIGHLIGHT_STYLES[cursor]='standout'
|
||||
|
||||
# Brackets
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-error]="standout"
|
||||
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]="bold,underline"
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-1]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-2]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-3]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-4]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-5]='none'
|
||||
fi
|
||||
# Brackets
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-error]="standout"
|
||||
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]="bold,underline"
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-1]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-2]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-3]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-4]='none'
|
||||
ZSH_HIGHLIGHT_STYLES[bracket-level-5]='none'
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user