Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ntamvl/6597b6e28a50a592519a1e2c89fa4386 to your computer and use it in GitHub Desktop.
Save ntamvl/6597b6e28a50a592519a1e2c89fa4386 to your computer and use it in GitHub Desktop.
iTerm2 - color 'ls' and other outputs for MacOS

iTerm2 - color 'ls' and other outputs for MacOS

That's right. For OS X and BSD's ls, the flag is -G. Many people customize the behavior of ls by replacing it with an alias that adds extra options. I have the following in my .bashrc, for example:

alias ls='LSCOLORS=gxfxcxdxbxexexabagacad /bin/ls -bFHGLOPW'

Besides enabling colors in general, this sets the LSCOLORS variable in order to change which ones ls uses.

@jmyrick-us
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment