diff --git a/aliases b/aliases index eb0a149..1308862 100644 --- a/aliases +++ b/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" diff --git a/functions b/functions index c7b2db0..cf964b5 100644 --- a/functions +++ b/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 +}