From: Sergey Matveev Date: Thu, 19 Dec 2019 12:00:38 +0000 (+0300) Subject: Sort filenames after grep X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=a65915c3bf698bdc7a8ec7d103b9de0e5f028707 Sort filenames after grep --- diff --git a/zsh/.zshrc b/zsh/.zshrc index 7dcc18f..be99ef3 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -110,7 +110,9 @@ bindkey -s "OR" " git status --short\n" # F3 # grep {{{ GREP=/usr/local/bin/grep g() { - $GREP --color=always --with-filename --line-number --recursive $@ | less --RAW-CONTROL-CHARS + $GREP --color=always --with-filename --line-number --recursive $@ | + sort --numeric-sort | + less --RAW-CONTROL-CHARS } alias -g G="| $GREP --color" alias grep="$GREP"