utils/bash/sources/20_fast-greps

16 lines
284 B
Plaintext
Raw Permalink Normal View History

2014-08-04 09:40:25 +00:00
#!/bin/bash
2022-08-11 16:39:41 +00:00
alias grepphp='grep -n --include=*.php'
alias grepjs='grep -n --include=*.js'
2014-08-04 09:40:25 +00:00
2022-08-11 16:39:41 +00:00
function grept {
2014-08-04 09:40:25 +00:00
if [[ -z "$1" ]]; then
__func_head "TYPE GREP_ARGS"
echo
else
CMD="grep --color=auto -n --include=*.$1"
shift
$CMD $@
fi
}