diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-08 14:38:09 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-08 14:38:09 -0500 |
commit | 4b418ee4900156ad98b316f31b7731d11837b164 (patch) | |
tree | 177e865439248f116503b5a9027887f4c1ec2bc4 /.config/bash/rc.d/10_aliases.sh | |
parent | 73792d5157d709ebe3d5ff35563692ac04e89fbd (diff) | |
parent | 3477cafcc1ecf1cefd2c36a7fac36c86443ea573 (diff) |
Merge branch 'master' into gluglugt60-par/master
Diffstat (limited to '.config/bash/rc.d/10_aliases.sh')
-rw-r--r-- | .config/bash/rc.d/10_aliases.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh index c3766da..9d008e2 100644 --- a/.config/bash/rc.d/10_aliases.sh +++ b/.config/bash/rc.d/10_aliases.sh @@ -3,9 +3,15 @@ ###################################################################### # Set up colors and settings for all the things # ###################################################################### -if [ -x "`which dircolors`" ]; then - eval "$(dircolors -p | cat - "${XDG_CONFIG_HOME}/dir_colors" | - dircolors -b -)" +if type dircolors &>/dev/null; then + eval "$( + { + dircolors -p + if [[ -f "${XDG_CONFIG_HOME}/dir_colors" ]]; then + cat "${XDG_CONFIG_HOME}/dir_colors" + fi + } | dircolors -b - + )" alias ls='ls -1v --color=auto' alias dir='dir -v --color=auto' alias vdir='vdir -v --color=auto' @@ -63,7 +69,7 @@ if [ -x "`which dircolors`" ]; then } diff() { - if [[ -t 1 ]]; then + if [[ -t 1 ]] && type colordiff &>/dev/null; then ( set -o pipefail command diff "$@" | colordiff |