aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2022-04-20 12:56:39 +0200
committerDavid Runge <dave@sleepmap.de>2022-04-20 12:56:39 +0200
commitc58b4d26b5ef99e427eff08a759148fd86250998 (patch)
treeada34fc0c25763114b62d9b982eedd86f9819f94
parent9cd02d6c59212377da39121666e8471a39be22c0 (diff)
downloaddotfiles-c58b4d26b5ef99e427eff08a759148fd86250998.tar.gz
dotfiles-c58b4d26b5ef99e427eff08a759148fd86250998.tar.bz2
dotfiles-c58b4d26b5ef99e427eff08a759148fd86250998.tar.xz
dotfiles-c58b4d26b5ef99e427eff08a759148fd86250998.zip
zsh: Only execute dircolors on systems providing it
.zshrc: Guard calls to dircolors with check for existence using `command -v`.
-rw-r--r--.zshrc4
1 files changed, 3 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 98d77c4..08504c0 100644
--- a/.zshrc
+++ b/.zshrc
@@ -3,7 +3,9 @@
for config_file ($HOME/.config/zsh/functions/*.zsh) source $config_file
# dircolors
# Set colors for ls output
-eval $(dircolors ~/.dircolors)
+if command -v dircolors > /dev/null; then
+ eval $(dircolors ~/.dircolors)
+fi
# Environment
#