mirror of
https://github.com/trapd00r/LS_COLORS.git
synced 2024-11-10 21:36:36 +01:00
5490a1b963
Name the local files `.LS_COLORS` not `.dircolors` Fixes #122
20 lines
486 B
Bash
Executable File
20 lines
486 B
Bash
Executable File
#!/usr/bin/env sh
|
|
#
|
|
|
|
lscolors_data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|
|
|
if dircolors -b LS_COLORS > lscolors.sh && dircolors -c LS_COLORS > lscolors.csh ; then
|
|
if mv -t "$lscolors_data_dir" lscolors.sh lscolors.csh ; then
|
|
cat <<EOF
|
|
To enable the colors, add the following line to your shell's start-up script:
|
|
|
|
For Bourne shell (e.g. ~/.bashrc or ~/.zshrc):
|
|
. $lscolors_data_dir/lscolors.sh"
|
|
|
|
For C shell (e.g. ~/.cshrc):
|
|
. $lscolors_data_dir/lscolors.csh
|
|
|
|
EOF
|
|
fi
|
|
fi
|