coreutils: dircolors invocation
1
1 10.4 ‘dircolors’: Color setup for ‘ls’
1 ======================================
1
1 ‘dircolors’ outputs a sequence of shell commands to set up the terminal
1 for color output from ‘ls’ (and ‘dir’, etc.). Typical usage:
1
1 eval "$(dircolors [OPTION]... [FILE])"
1
1 If FILE is specified, ‘dircolors’ reads it to determine which colors
1 to use for which file types and extensions. Otherwise, a precompiled
1 database is used. For details on the format of these files, run
1 ‘dircolors --print-database’.
1
1 To make ‘dircolors’ read a ‘~/.dircolors’ file if it exists, you can
1 put the following lines in your ‘~/.bashrc’ (or adapt them to your
1 favorite shell):
1
1 d=.dircolors
1 test -r $d && eval "$(dircolors $d)"
1
1 The output is a shell command to set the ‘LS_COLORS’ environment
1 variable. You can specify the shell syntax to use on the command line,
1 or ‘dircolors’ will guess it from the value of the ‘SHELL’ environment
1 variable.
1
11 The program accepts the following options. Also see ⇒Common
options.
1
1 ‘-b’
1 ‘--sh’
1 ‘--bourne-shell’
1 Output Bourne shell commands. This is the default if the ‘SHELL’
1 environment variable is set and does not end with ‘csh’ or ‘tcsh’.
1
1 ‘-c’
1 ‘--csh’
1 ‘--c-shell’
1 Output C shell commands. This is the default if ‘SHELL’ ends with
1 ‘csh’ or ‘tcsh’.
1
1 ‘-p’
1 ‘--print-database’
1 Print the (compiled-in) default color configuration database. This
1 output is itself a valid configuration file, and is fairly
1 descriptive of the possibilities.
1
1 An exit status of zero indicates success, and a nonzero value
1 indicates failure.
1