Quellcode durchsuchen

Re-incarnate grepr alias as function

Alois Mahdal vor 9 Jahren
Ursprung
Commit
8ac953b56d
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. 5
    1
      dotfiles/bash/main.bashrc

+ 5
- 1
dotfiles/bash/main.bashrc Datei anzeigen

21
     fi
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
 gitcd() {
29
 gitcd() {
25
     cd "$(git rev-parse --show-toplevel)"
30
     cd "$(git rev-parse --show-toplevel)"
26
 }
31
 }
55
 alias diff='diff -u'
60
 alias diff='diff -u'
56
 alias pad4='sed -e "s/^/    /"'
61
 alias pad4='sed -e "s/^/    /"'
57
 alias grep='grep --color --binary-files=without-match'
62
 alias grep='grep --color --binary-files=without-match'
58
-alias grepr='grep -nr . --exclude-dir=".git" -e '
59
 alias sc='se --direction=encz.cz'
63
 alias sc='se --direction=encz.cz'
60
 alias lsblk='lsblk -o +UUID,LABEL'
64
 alias lsblk='lsblk -o +UUID,LABEL'
61
 alias xi='xclip -i'
65
 alias xi='xclip -i'