diff --git a/bash/aliases b/bash/aliases index 8106621..8eaefb1 100644 --- a/bash/aliases +++ b/bash/aliases @@ -55,7 +55,6 @@ alias can-haz='sudo apt-get install ' alias take='sudo chown $(whoami):$(whoami) ' alias simple-http-server='python3 -m http.server' alias numfiles='find . -maxdepth 1 -type f | wc -l' -alias deepgrep='find . -type d -name "node_modules" -prune -o -type f -not -name "*.swp" -not -name "*.pyc" | sed "s/$/\"/g" | sed "s/^/\"/g" | xargs grep --color ' alias slugify="sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z" # Show list of git branches diff --git a/bash/functions b/bash/functions index 5a9c889..6a1b8dc 100644 --- a/bash/functions +++ b/bash/functions @@ -28,3 +28,13 @@ function add-date-prefix { function get-bitrate { exiftool -AudioBitrate "$1" | awk '{print $4}' } + +function deepgrep { + find . \ + -type d -name node_modules -prune -o \ + -type d -name .git -prune -o \ + -type f \ + -not -name "*.swp" \ + -not -name "*.pyc" \ + -exec grep --with-filename --color "$@" {} \; +}