瀏覽代碼

Re-implement greph as a .bashrc function

Alois Mahdal 9 年之前
父節點
當前提交
effea5bbb8
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      dotfiles/bash/main.bashrc

+ 4
- 0
dotfiles/bash/main.bashrc 查看文件

@@ -26,6 +26,10 @@ grepr() {
26 26
     grep --color -n --exclude-dir=".git" -e "$p" -r "$@"
27 27
 }
28 28
 
29
+greph() {
30
+    <"$HOME/.bash_history" grep "$@"
31
+}
32
+
29 33
 gitcd() {
30 34
     cd "$(git rev-parse --show-toplevel)"
31 35
 }