diff --git a/includes/bash_aliases.bash b/includes/bash_aliases.bash index a22494c..bdb09fb 100644 --- a/includes/bash_aliases.bash +++ b/includes/bash_aliases.bash @@ -18,7 +18,6 @@ alias e="subl" alias gh="github" alias +x="chmod +x" alias x+="chmod +x" -alias g="ack -ri" # Detect which `ls` flavor is in use if ls --color > /dev/null 2>&1; then # GNU `ls` diff --git a/includes/bash_functions.bash b/includes/bash_functions.bash index e48aff1..70098ac 100644 --- a/includes/bash_functions.bash +++ b/includes/bash_functions.bash @@ -13,6 +13,12 @@ function f() { find . -name "$1" 2>/dev/null } +# Quick grep: ag (+sack), ack or grep +if command -v sag >/dev/null 2>&1; then alias g="sack -ag" +elif command -v ag >/dev/null 2>&1; then alias g="ag -i" +elif command -v ack >/dev/null 2>&1; then alias g="ack -ri" +else alias g="grep -ri"; fi + # Compare original and gzipped file size function gz() { local origsize=$(wc -c < "$1") diff --git a/setup/stuff.sh b/setup/stuff.sh index a3a99aa..85ec9e4 100755 --- a/setup/stuff.sh +++ b/setup/stuff.sh @@ -56,9 +56,12 @@ cd - # Extend global $PATH echo -e "setenv PATH $HOME/dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | sudo tee /etc/launchd.conf +# Ag, the better ack, which is the better grep +brew install the_silver_searcher +brew install https://raw.github.com/nybblr/homebrew-dev/master/sack.rb + # Everything else brew install unrar -brew install ack brew install msmtp --with-macosx-keyring brew install mutt --sidebar-patch