fancy list-color
Originally nicoulaj at
Thank you very much Julien Nicoulaud!
Adapted by: Takeshi Banse <takebi@laafc.net>, public domain
I want to teach the $LS_COLORS as much as possible.
It is far from complete though. It can’t respect the file-type specific dircolor settings. Though it will try to respect the directory-type color (which is set by dircolors) by giving a special attention to the completion group name, but it’s still quite error-prone. Please be aware of.
Install
% git clone https://github.com/hchbaw/list-colors.zsh.git
% cd list-colors.zsh
% $SHELL -uc ". ./list-colors.zsh && list-colors-zcompile ~/.dir_colors ~/.zsh/"
** Dumping and zcompiling for ~/.dir_colors
re-compiling ~/.zsh/list-colors-init.zwc: succeeded
** All done.
** Please update your .zshrc like this:
-- >8 --
fpath+=~/.zsh
autoload -Uz list-colors-init; list-colors-init
zstyle -e ':completion:*:default' list-colors list-colors list-colors-aux
# zstyle ':completion:*' group-name ''
# If you want to make it to respect directory-type color setting, you need
# to uncomment above line, please.
-- 8< --
list-colors-zcomplie
NAME
list-colors-zcompile - Dump and zcompile list-corols.zsh
SYNOPSIS
'list-colors-zcompile' <dircolors file> <directory to output> <color file>
DESCRIPTION
Dumps out the list-colors.zsh’s variable which will be converted from
<dircolors file> (dircolors(5)
) and functions which will be actually
needed at the runtime under <directory to output> which is most likely in
$fpath
. <color file> is used to define the colors which maps dircolors
color to the another/cursor color.
EXAMPLES
The following will read the '~/.dir_colors' then generate '~/.zsh/list-colols{,zwc}'.
% $SHELL -uc ". ./list-colors && list-colors-zcompile ~/.dir_colors ~/.zsh"