From b1e7cd4a9862bfc0133c37566c6381f0b45897ac Mon Sep 17 00:00:00 2001 From: Christian Baer Date: Sun, 6 Dec 2020 11:53:43 +0100 Subject: [PATCH] Check if command dircolors exists. --- .config/zsh/lib/30-colors.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/zsh/lib/30-colors.zsh b/.config/zsh/lib/30-colors.zsh index b866ba0..e78374d 100644 --- a/.config/zsh/lib/30-colors.zsh +++ b/.config/zsh/lib/30-colors.zsh @@ -5,7 +5,11 @@ LSCOLORS="gxfxcxdxbxegedabagacad" CLICOLOR="YES" ## Load .dir_colors for GNU systems -test -r "$XDG_CONFIG_HOME/dircolors" && eval $(dircolors "$XDG_CONFIG_HOME"/dircolors) +if command -v dircolors &> /dev/null; then + test -r "$XDG_CONFIG_HOME/dircolors" && eval $(dircolors "$XDG_CONFIG_HOME"/dircolors) +fi + + FX=( reset "%{%}"