96 lines
3.9 KiB
Bash
96 lines
3.9 KiB
Bash
# zsh-syntax-highlighting theme, 256 colours.
|
|
|
|
function()
|
|
{
|
|
|
|
local -A _ttc # tastytea theme colour
|
|
_ttc[builtins]="99"
|
|
_ttc[commands]="99"
|
|
_ttc[keywords]="171"
|
|
_ttc[options]="69"
|
|
_ttc[variables]="166"
|
|
_ttc[strings]="36"
|
|
_ttc[misc]="39"
|
|
_ttc[math]="214"
|
|
_ttc[dark]="244"
|
|
_ttc[light]="255"
|
|
_ttc[error]="201"
|
|
|
|
# <https://github.com/zsh-users/zsh-syntax-highlighting/tree/master/highlighters/main>
|
|
unset ZSH_HIGHLIGHT_STYLES
|
|
typeset -gA ZSH_HIGHLIGHT_STYLES
|
|
|
|
# Builtins
|
|
ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=${_ttc[keywords]}"
|
|
ZSH_HIGHLIGHT_STYLES[builtin]="fg=${_ttc[builtins]}"
|
|
ZSH_HIGHLIGHT_STYLES[function]="fg=${_ttc[builtins]}"
|
|
# ZSH_HIGHLIGHT_STYLES[hashed-command]="fg=green,standout" # ???
|
|
ZSH_HIGHLIGHT_STYLES[alias]="fg=${_ttc[builtins]}"
|
|
ZSH_HIGHLIGHT_STYLES[suffix-alias]="fg=${_ttc[builtins]}"
|
|
ZSH_HIGHLIGHT_STYLES[global-alias]="fg=${_ttc[builtins]}"
|
|
ZSH_HIGHLIGHT_STYLES[autodirectory]="fg=${_ttc[builtins]}"
|
|
|
|
# Commands
|
|
ZSH_HIGHLIGHT_STYLES[command]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[precommand]="fg=${_ttc[builtins]},underline"
|
|
ZSH_HIGHLIGHT_STYLES[arg0]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[process-substitution]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-quoted]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-unquoted]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]="fg=${_ttc[options]}"
|
|
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]="fg=${_ttc[options]}"
|
|
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]="fg=${_ttc[misc]}"
|
|
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-unclosed]="fg=${_ttc[misc]},bold"
|
|
|
|
# Punctuation
|
|
ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=${_ttc[misc]}"
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-quoted]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-unquoted]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]="fg=${_ttc[commands]}"
|
|
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]="fg=${_ttc[misc]}"
|
|
|
|
# Text, quotes
|
|
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=${_ttc[strings]}"
|
|
ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]="fg=${_ttc[strings]},bold"
|
|
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=${_ttc[strings]}"
|
|
ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]="fg=${_ttc[strings]},bold"
|
|
ZSH_HIGHLIGHT_STYLES[rc-quote]="fg=${_ttc[strings]}"
|
|
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]="fg=${_ttc[variables]}"
|
|
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument-unclosed]="fg=${_ttc[variables]},bold"
|
|
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=${_ttc[variables]}"
|
|
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=${_ttc[misc]}"
|
|
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]="fg=${_ttc[strings]}"
|
|
|
|
# Variables, constants
|
|
ZSH_HIGHLIGHT_STYLES[assign]="fg=${_ttc[variables]}"
|
|
ZSH_HIGHLIGHT_STYLES[named-fd]="fg=${_ttc[variables]}"
|
|
ZSH_HIGHLIGHT_STYLES[numeric-fd]="fg=${_ttc[variables]}"
|
|
ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]="fg=${_ttc[math]}"
|
|
|
|
# Paths
|
|
ZSH_HIGHLIGHT_STYLES[path]="none"
|
|
ZSH_HIGHLIGHT_STYLES[path_pathseparator]="none,bold"
|
|
ZSH_HIGHLIGHT_STYLES[path_prefix]="fg=${_ttc[dark]}"
|
|
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]="fg=${_ttc[dark]},bold"
|
|
|
|
# Misc
|
|
ZSH_HIGHLIGHT_STYLES[default]="none"
|
|
ZSH_HIGHLIGHT_STYLES[comment]="fg=${_ttc[dark]},italic"
|
|
ZSH_HIGHLIGHT_STYLES[unknown-token]="none"
|
|
ZSH_HIGHLIGHT_STYLES[globbing]="none,bold"
|
|
ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=${_ttc[builtins]}"
|
|
ZSH_HIGHLIGHT_STYLES[redirection]="fg=${_ttc[light]}"
|
|
|
|
# Brackets
|
|
ZSH_HIGHLIGHT_STYLES[bracket-error]="fg=${_ttc[error]},bold"
|
|
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'
|
|
|
|
}
|