vivid LS_COLORS
as zsh plugins.
installable anywhere that supports git repositories as plugins.
simply put, this is faster than calling an external CLI.
benchmark results via hyperfine
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
plugin |
0.2 ± 0.4 | 0.0 | 3.1 | 1.00 |
cli |
3.8 ± 2.4 | 1.9 | 27.3 | 16.36 ± 27.48 |
$ hyperfine --shell "zsh" --warmup=5 'vivid_theme=nord source vivid-zsh.plugin.zsh' -n plugin 'export LS_COLORS="$(vivid generate nord)"' -n cli
yes, this is faster than rust. insane.
it depends on what you are using for managing your zsh plugins.
ryanccn/vivid-zsh
to your .zsh_plugins.txt
vivid_theme="<name of theme>"
before antidote load
antigen bundle ryanccn/vivid-zsh
vivid_theme="<name of theme>"
in your ~/.zshrc
before antigen loads$ git clone https://github.com/ryanccn/vivid-zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/vivid-zsh
~/.zshrc
plugins=(
# other plugins...
vivid-zsh
)
vivid_theme="<name of theme>"
before oh my zsh is initialized$ mkdir -p ~/.zsh
$ git clone https://github.com/ryanccn/vivid-zsh.git ~/.zsh/vivid-zsh
.zshrc
vivid_theme="<name of theme>"
source ~/.zsh/vivid-zsh/vivid-zsh.zsh
export LS_COLORS=
./build.sh
mit