Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Detect which `ls` flavor is in use (Mac or Linux)
- if ls --color > /dev/null 2>&1; then
- ls_color_flag="--color" # GNU/Linux
- else
- ls_color_flag="-G" # BSD/macOS
- fi
- # Always show color when interactive
- alias ls="ls ${ls_color_flag}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement