Advertisement
Guest User

Untitled

a guest
May 19th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. # Detect which `ls` flavor is in use (Mac or Linux)
  2. if ls --color > /dev/null 2>&1; then
  3. ls_color_flag="--color" # GNU/Linux
  4. else
  5. ls_color_flag="-G" # BSD/macOS
  6. fi
  7.  
  8. # Always show color when interactive
  9. alias ls="ls ${ls_color_flag}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement