diff options
Diffstat (limited to '.config/bash')
-rw-r--r-- | .config/bash/rc.d/10_aliases.sh | 14 | ||||
-rw-r--r-- | .config/bash/rc.d/10_hist.sh | 2 |
2 files changed, 11 insertions, 5 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 diff --git a/.config/bash/rc.d/10_hist.sh b/.config/bash/rc.d/10_hist.sh index 6b2c4f1..3d34d6e 100644 --- a/.config/bash/rc.d/10_hist.sh +++ b/.config/bash/rc.d/10_hist.sh @@ -4,6 +4,6 @@ HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups HISTFILE=${XDG_DATA_HOME}/bash/history HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' -HISTSIZE=5000 +HISTSIZE=50000 shopt -s histappend # append to the history file, don't overwrite it mkdir -p "${HISTFILE%/*}" |