1
0
Fork 0

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.
pull/83/head
Joseph Irwin 13 years ago
parent 6d38d9836b
commit 33b42e7398

@ -15,6 +15,8 @@ if (( $+commands[dircolors] )); then
if zstyle -t ':omz:alias:ls' color; then if zstyle -t ':omz:alias:ls' color; then
if [[ -f "$HOME/.dir_colors" ]]; then if [[ -f "$HOME/.dir_colors" ]]; then
eval $(dircolors "$HOME/.dir_colors") eval $(dircolors "$HOME/.dir_colors")
else
eval $(dircolors)
fi fi
alias ls="$aliases[ls] --color=auto" alias ls="$aliases[ls] --color=auto"
else else

Loading…
Cancel
Save