penguin/utils

my env utils

bash/sources/14_shortcuts_greps

raw ยท 284 bytes

#!/bin/bash

alias grepphp='grep -n --include=*.php'
alias grepjs='grep -n --include=*.js'

function grept {
    if [[ -z "$1" ]]; then
        __func_head "TYPE GREP_ARGS"
        echo
    else
        CMD="grep --color=auto -n --include=*.$1"
        shift
        $CMD $@
    fi
}