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