]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
setup.sh: add support for OpenBSD's colorls
authorSimon Ruderich <simon@ruderich.org>
Fri, 15 Jul 2016 13:17:03 +0000 (15:17 +0200)
committerSimon Ruderich <simon@ruderich.org>
Fri, 15 Jul 2016 13:17:03 +0000 (15:17 +0200)
setup.sh

index d3a85d5d7d0778e06288fefcacca96bd37ea573b..eec1ded59a0911614c2f0586df54fa3b086c088c 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -90,6 +90,9 @@ elif ls -G >/dev/null 2>&1; then
     # Don't display hidden files by default when running as root (-I), I use
     # `la` for that.
     ls_args='CLICOLOR_FORCE=1 command ls -G -I'
+# OpenBSD has no colored ls, use colorls instead.
+elif colorls -G >/dev/null 2>&1; then
+    ls_args='CLICOLOR_FORCE=1 colorls -G'
 # Simple ls with no colors.
 else
     ls_args='command ls'