Skip to content

Commit

Permalink
fix(color): skip dircolors command not found
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Feb 18, 2019
1 parent f5fd947 commit e87f961
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions 1bash.d/0_colors.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

if [ -f ~/.dircolors ]; then
eval "$( dircolors -b ~/.dircolors )"
elif [ -f $ONE_BASH/dircolors ]; then
eval "$( dircolors -b $ONE_BASH/dircolors )"
if type dircolors > /dev/null 2>&1; then
if [ -f ~/.dircolors ]; then
eval "$( dircolors -b ~/.dircolors )"
elif [ -f $ONE_BASH/dircolors ]; then
eval "$( dircolors -b $ONE_BASH/dircolors )"
fi
fi

# Detect which `ls` flavor is in use
Expand Down

0 comments on commit e87f961

Please sign in to comment.