dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit 0b1f2f9e74e0b3d91b41332328147201b5c15ae8 (patch)
parent 01fc68aeff61526567375323c2d5abc3cde732b6
Author: Alexander Karle <akarle@umass.edu>
Date:   Wed,  2 May 2018 02:27:26 -0400

Adding color to ls in bash

Diffstat:
Mbash/aliases | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/bash/aliases b/bash/aliases @@ -1,6 +1,14 @@ +# Detect which `ls` flavor is in use +if ls --color > /dev/null 2>&1; then # GNU `ls` + colorflag="--color" +else # macOS `ls` + colorflag="-G" +fi + # ls aliases -alias l='ls -lAh' -alias ll='ls -lh' +alias ls='ls ${colorflag}' +alias l='ls -lAh ${colorflag}' +alias ll='ls -lh ${colorflag}' # Git aliases alias ga='git add'