X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=zsh%2F.zshrc;h=b4d8203bd0427e2691561ff4625beecaa68a77bc;hb=f88a1c0d2b98246f0a1ffa44c8013ba87e7c8b5b;hp=adc241e438f48e0c39cdec09f19a348a6ce6bd76;hpb=4627246037d15795c78ca66a0618278fcc1897dc;p=dotfiles.git diff --git a/zsh/.zshrc b/zsh/.zshrc index adc241e..b4d8203 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -96,6 +96,7 @@ alias Gd="git diff" alias Gs="git show" alias Gm="git diff --name-only --diff-filter=M" alias Gam="git commit --amend" +alias -g W="| wc -l" git_common="--oneline --abbrev-commit" alias Gl="git log $git_common --graph --decorate=short" @@ -109,10 +110,13 @@ bindkey -s "OR" " git status --short\n" # F3 # 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 "