From 2c3ec22ddfa95444cf7d512f7ef85d4c94a58041 Mon Sep 17 00:00:00 2001 From: Chris Coley <chris@codingallnight.com> Date: Wed, 10 Jan 2024 00:56:34 -0800 Subject: [PATCH] Fix color support for ls on Mac --- bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bashrc b/bashrc index 3e04089..6a0df17 100644 --- a/bashrc +++ b/bashrc @@ -87,6 +87,12 @@ if [ -x /usr/bin/dircolors ]; then alias egrep='egrep --color=auto' fi +# Enable color support on Mac +if [ "$(uname)" == "Darwin" ] && [ -x /usr/local/bin/dircolors ]; then + export CLICOLOR=1 + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" +fi + # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. -- GitLab