warhol.plugin.zsh
warhol.plugin.zsh copied to clipboard
Colorize command output using grc and lscolors
warhol.plugin.zsh
Table of Contents
- warhol.plugin.zsh
- Installing
- Zgenom
- Antigen
- Oh-My-Zsh
- Without using any frameworks
- Tips
- Installing
Adds color-related helper scripts.
- Colorize command output using
grc(when present) and lscolors. - Add
colorize-tab,iterm-tab-color,tab-reset-color,tab-red,tab-greenandtab-bluehelper scripts to colorize Iterm 2 tabs.
Installing
Zgenom
Add zgenom load unixorn/warhol.plugin.zsh to your .zshrc with your other load commands.
Antigen
Add antigen bundle unixorn/warhol.plugin.zsh to your .zshrc
Oh-My-Zsh
If you're using oh-my-zsh:
-
In the command line, change to oh-my-zsh's custom plugin directory :
cd ~/.oh-my-zsh/custom/plugins/ -
Clone the repository into a new
warholdirectory in your custom plugins:git clone https://github.com/unixorn/warhol.plugin.zsh.git warhol -
Edit your
~/.zshrcand addwarhol.plugin.zsh– same as clone directory – to the list of plugins to enable:plugins=( ... warhol ) -
Then, restart your terminal application to refresh context and use the plugin. Alternatively, you can source your current shell configuration:
source ~/.zshrc
Without using any frameworks
git clone [email protected]:unixorn/warhol.plugin.zsh.git- Add its bin directory to your
$PATH. If you're using ZSH, you can just addsource /path/to/clone/of/warhol.plugin.zshto your.zshrcfile.
The scripts in here don't actually require you to be using ZSH as your login shell, they're being distributed as a ZSH plugin because that's convenient.
Tips
Customizing LSCOLORS for macOS/BSD and LS_COLORS for Linux is a hassle. It's even more of a hassle to keep them in sync across macOS/BSD and Linux.
Fortunately, Geoff Greer made an online tool that makes it easy to customize your color scheme and keep them in sync across Linux and OS X/*BSD available online at lscolors.
I've included my LSCOLORS and LS_COLORS settings in this plugin, but they won't be applied if you already have set LSCOLORS or LS_COLORS.
The easiest way to change them if you use a ZSH framework is to redeclare the variables in your .zshrc after your framework loads your plugins.