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

23 lines
594 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

typeset -Ag FX FG BG
## Set Colors on BSD system
LSCOLORS="gxfxcxdxbxegedabagacad"
CLICOLOR="YES"
## Load .dir_colors for GNU systems
test -r "~/.dir_colors" && eval $(dircolors ~/.dir_colors)
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