Skip to content

Instantly share code, notes, and snippets.

@msafronov
Created December 23, 2016 11:11
Show Gist options
  • Save msafronov/3ecb4756aeca5ce7e3fd0a81a9e3f123 to your computer and use it in GitHub Desktop.
Save msafronov/3ecb4756aeca5ce7e3fd0a81a9e3f123 to your computer and use it in GitHub Desktop.
# 'sss' file searching alias for .bashrc
# ignores 'node_modules' folder by default
# syntax:
# syntax: sss <word> <path> (path is optional, current dir as default)
sssfunc() {
if [ -z $1 ]; then
echo 'wrong parameters';
echo 'syntax: sss <word> <path> (path is optional, current dir as default)';
return
fi
grep -R -n --exclude-dir=node_modules $1 $2. 2> /dev/null
}
alias sss=sssfunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment