Updated README – information on loading via Zplugin (Zsh)

This commit is contained in:
Sebastian Gniazdowski 2019-01-31 09:24:09 +01:00
parent b2caca7f51
commit 1261c4d1c0

View file

@ -3,6 +3,7 @@
* [What does it look like?](#what-does-it-look-like)
* [Installation](#installation)
* [Arch Linux](#arch-linux)
* [Zsh / Zplugin](#zsh-integration-with-zplugin)
* [ZSH syntax highlighting](#zsh-syntax-highlighting)
* [fish shell](#fish-shell)
* [Information for Developers](#information-for-developers)
@ -60,6 +61,20 @@ echo 'eval $(dircolors -b $HOME/.dircolors)' >> $HOME/.bashrc
Arch Linux users can install the [`lscolors-git`][3] package from the AUR for easy
integration with bash, csh, or zsh.
## zsh integration with Zplugin
There's a Zsh plugin manager `Zplugin` that nicely works with this repository
 `dircolors` will be ran **only once on each update**. So `dircolors` will not
read the `LS_COLORS` definitions and perform the computation each time a new
shell is started, but **instead** only once per `trapd00r/LS_COLORS` install
and per update (with `zplugin update trapd00r/LS_COLORS`) and only then
generating the script `c.zsh` containing the `dircolors` output and after this
just sourcing it when the shell starts, thus making the shell to startup faster:
```
zplugin ice atclone"dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh"
zplugin load trapd00r/LS_COLORS
```
## ZSH syntax highlighting
[zsh-syntax-highlighting-filetypes][0] highlights file on the command-line in
realtime, using these colors.