Parcourir la source

Re-incarnate grepr alias as function

Alois Mahdal il y a 9 ans
Parent
révision
8ac953b56d
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5
    1
      dotfiles/bash/main.bashrc

+ 5
- 1
dotfiles/bash/main.bashrc Voir le fichier

@@ -21,6 +21,11 @@ git() {
21 21
     fi
22 22
 }
23 23
 
24
+grepr() {
25
+    local p=$1; shift
26
+    grep --color -n --exclude-dir=".git" -e "$p" -r "$@"
27
+}
28
+
24 29
 gitcd() {
25 30
     cd "$(git rev-parse --show-toplevel)"
26 31
 }
@@ -55,7 +60,6 @@ alias open='gnome-open'
55 60
 alias diff='diff -u'
56 61
 alias pad4='sed -e "s/^/    /"'
57 62
 alias grep='grep --color --binary-files=without-match'
58
-alias grepr='grep -nr . --exclude-dir=".git" -e '
59 63
 alias sc='se --direction=encz.cz'
60 64
 alias lsblk='lsblk -o +UUID,LABEL'
61 65
 alias xi='xclip -i'