From 1261c4d1c0ac5e6819e63e51aac5a1b981fb70b4 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 31 Jan 2019 09:24:09 +0100 Subject: [PATCH] =?UTF-8?q?Updated=20README=20=E2=80=93=C2=A0information?= =?UTF-8?q?=20on=20loading=20via=20Zplugin=20(Zsh)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.markdown | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.markdown b/README.markdown index ce8d060..154dc15 100644 --- a/README.markdown +++ b/README.markdown @@ -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.