# grep {{{
GREP=/usr/local/bin/grep
+GREP_ARGS="--color=always --with-filename --line-number --recursive"
+LESS_COLORED="less --RAW-CONTROL-CHARS"
g() {
- $GREP --color=always --with-filename --line-number --recursive $@ |
- sort --numeric-sort |
- less --RAW-CONTROL-CHARS
+ $GREP ${=GREP_ARGS} $@ | ${=LESS_COLORED}
+}
+gS() {
+ $GREP ${=GREP_ARGS} $@ | sort --numeric-sort | ${=LESS_COLORED}
}
alias -g G="| $GREP --color"
alias gg="git grep "