Create function and alias for ag stats

This commit is contained in:
Andrew Tomaka 2020-09-10 10:09:35 -04:00
parent 4c97c4d628
commit a9c09b8692
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
2 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,7 @@ alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias a="ls -l --human-readable --all --color=auto"
alias agc="ag-count"
alias agh="ag --hidden"
alias awsp="aws-profile"
alias b="bundle"

View file

@ -122,3 +122,13 @@ function yarn-install-like-bundle {
yarn install
fi
}
function ag-count {
if [ $# -lt 1 ]; then
echo Usage: ag-count SEARCHTERM
else
searchterm=$1; shift
ag --stats $searchterm | tail -n5
fi
}