Ack -> Ag.

This commit is contained in:
Artem Sapegin
2013-03-14 23:22:15 +04:00
parent e16b0b1397
commit bf1caa5979
3 changed files with 10 additions and 2 deletions

View File

@ -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`

View File

@ -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")