Merge pull request #119 from psprint/master

Updated README – information on loading via Zplugin (Zsh)
This commit is contained in:
Ryan Delaney 2019-01-31 10:22:25 -08:00 committed by GitHub
commit 6f5879e14b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

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.