dotfiles/.zsh/lib/30-colors.zsh

23 lines
594 B
Bash
Raw Normal View History

2016-04-16 16:31:54 +02:00
typeset -Ag FX FG BG
## Set Colors on BSD system
2020-06-02 23:19:46 +02:00
LSCOLORS="gxfxcxdxbxegedabagacad"
2020-06-02 23:16:52 +02:00
CLICOLOR="YES"
2016-04-16 16:31:54 +02:00
## Load .dir_colors for GNU systems
test -r "~/.dir_colors" && eval $(dircolors ~/.dir_colors)
2016-04-16 16:31:54 +02:00
FX=(
reset "%{%}"
bold "%{%}" no-bold "%{%}"
italic "%{%}" no-italic "%{%}"
underline "%{%}" no-underline "%{%}"
blink "%{%}" no-blink "%{%}"
reverse "%{%}" no-reverse "%{%}"
)
for color in {000..255}; do
FG[$color]="%{[38;5;${color}m%}"
BG[$color]="%{[48;5;${color}m%}"
done