dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 480cf815547ace87e227cfc764770ea1faddbf1a
parent bf1d3441f5a5570297872425ec81bc6a0822705c
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri, 29 Dec 2017 22:07:58 -0500

Set HISTCONTROL; colorize grep

Diffstat:
M.bashrc | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -7,6 +7,7 @@ then fi export EDITOR=vim +export HISTCONTOL=erasedups # Turn on ls colors if command -v dircolors > /dev/null 2>&1 @@ -18,11 +19,15 @@ else export LSCOLORS=ExFxBxDxCxegedabagacad fi -# Colorize pacman if its it exists -if command -v pacman > /dev/null 2>&1 -then - alias pacman='pacman --color=auto' -fi +# Colorize others if they exist +COLORIZE_CMDS="pacman grep egrep fgrep" +for cmd in $COLORIZE_CMDS +do + if command -v $cmd > /dev/null 2>&1 + then + alias $cmd="$cmd --color=auto" + fi +done # Configure GPG and start the agent if it isn't already running if command -v gpg-connect-agent > /dev/null 2>&1