Run 'dircolors' without '~/.dir_colors' if absent
Add an else condition to run $(dircolors) if the '~/.dir_colors' file does not exist; this allows the use of default colors when the user has not made any customizations.
This commit is contained in:
parent
6d38d9836b
commit
33b42e7398
1 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,8 @@ if (( $+commands[dircolors] )); then
|
|||
if zstyle -t ':omz:alias:ls' color; then
|
||||
if [[ -f "$HOME/.dir_colors" ]]; then
|
||||
eval $(dircolors "$HOME/.dir_colors")
|
||||
else
|
||||
eval $(dircolors)
|
||||
fi
|
||||
alias ls="$aliases[ls] --color=auto"
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue