Browse Source

Re-incarnate grepr alias as function

Alois Mahdal 10 years ago
parent
commit
8ac953b56d
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      dotfiles/bash/main.bashrc

+ 5
- 1
dotfiles/bash/main.bashrc View File

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'