]> Sergey Matveev's repositories - dotfiles.git/blobdiff - zsh/.zshrc
Sort filenames after grep
[dotfiles.git] / zsh / .zshrc
index 7dcc18fe8189b791185246b0d6902116be750023..be99ef3acd451f3221140daa545a31b941697967 100644 (file)
@@ -110,7 +110,9 @@ bindkey -s "\eOR" " 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"