X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=zsh%2F.zshrc;h=32125143c1d8dfbca070aeb00a340949d313831a;hb=c597a1d86c60f1588df0470345976c2bd0686101;hp=ae91d475d861e37796b482dbe434fa39cad86983;hpb=dd9b8e3a8eb1e85809e8c37d17cf7ba3939fa1a2;p=dotfiles.git diff --git a/zsh/.zshrc b/zsh/.zshrc index ae91d47..3212514 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,13 +110,15 @@ 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 grep="$GREP" alias gg="git grep " # }}}