To customize these settings, just fire up vim and create a .bash_profile in your home directory:
vim ~/.bash_profile
Then you can add the following to it:
export CLICOLOR=1
export LSCOLORS=exfxcxdxbxegedabagacad
export LSCOLORS=exfxcxdxbxegedabagacad
The first line tells the terminal to use ANSI color sequences to distinguish file types. The second line is where all the magic happens.
Each pair of letters represents an individual foreground/background setting for a particular filetype. The pairs are defined as follows:
- directory
- symbolic link
- socket
- pipe
- executable
- block special
- character special
- executable with setuid bit set
- executable with setgid bit set
- directory writable to others, with sticky bit
- directory writable to others, without sticky bit
The foreground and background colors can be one of the following:
- a black
- b red
- c green
- d brown
- e blue
- f magenta
- g cyan
- h light grey
- A bold black, usually shows up as dark grey
- B bold red
- C bold green
- D bold brown, usually shows up as yellow
- E bold blue
- F bold magenta
- G bold cyan
- H bold light grey; looks like bright white
- x default foreground or background
As a quick example, let's make our directories and executable files easy to find:
export LSCOLORS=Gxgxxxxxcxxxxxxxxx
And this is the result:
No comments:
Post a Comment