Create function and alias for ag stats
This commit is contained in:
parent
4c97c4d628
commit
a9c09b8692
2 changed files with 11 additions and 0 deletions
1
aliases
1
aliases
|
@ -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"
|
||||
|
|
10
functions
10
functions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue