From 1a80abd95d93db9e0a3b0646bd346ee9e6a5fcd5 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 30 Jan 2016 16:45:56 +0800 Subject: Rip out the heavy oh-my-zsh ... Credits: [1] https://github.com/spicycode/ze-best-zsh-config [2] Zsh Configuration from the Ground Up http://zanshin.net/2013/02/02/zsh-configuration-from-the-ground-up/ --- _zsh/colors.zsh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 _zsh/colors.zsh (limited to '_zsh/colors.zsh') diff --git a/_zsh/colors.zsh b/_zsh/colors.zsh new file mode 100644 index 0000000..b9a4797 --- /dev/null +++ b/_zsh/colors.zsh @@ -0,0 +1,27 @@ +# +# zsh/colors.sh +# + +autoload -U colors && colors + +# The variables are wrapped in %{%}. This should be the case for every +# variable that does not contain space. +for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do + eval PR_$COLOR='%{$fg_no_bold[${(L)COLOR}]%}' + eval PR_BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}' +done + +eval RESET='$reset_color' +export PR_RED PR_GREEN PR_YELLOW PR_BLUE PR_WHITE PR_BLACK +export PR_BOLD_RED PR_BOLD_GREEN PR_BOLD_YELLOW PR_BOLD_BLUE +export PR_BOLD_WHITE PR_BOLD_BLACK + +# colors for BSD ls +if [[ -n "${IS_BSD}" ]]; then + export CLICOLOR=1 + #export LSCOLORS=Gxfxcxdxbxegedabagacad + export LSCOLORS=exfxcxdxbxegedabagacad +fi + + +# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: # -- cgit v1.2.2