Преглед изворни кода

Add grepfx() to grep for technical debt (AKA #FIXMEs)

Alois Mahdal пре 6 година
родитељ
комит
8db0bc528c
1 измењених фајлова са 12 додато и 0 уклоњено
  1. 12
    0
      dotfiles/bash/main.bashrc

+ 12
- 0
dotfiles/bash/main.bashrc Прегледај датотеку

@@ -71,6 +71,18 @@ grepcl() {
71 71
         "$HOME/.weechat/logs"
72 72
 }
73 73
 
74
+grepfx() {
75
+    #
76
+    # Grep recursively for technical debt
77
+    #
78
+    # '[F]' hack to avoid matching self
79
+    #
80
+    grep --color -n \
81
+        --exclude-dir 'utils' \
82
+        --exclude-dir '.git' \
83
+        -o '#[F]IXME:.*' -r "$@"
84
+}
85
+
74 86
 grepr() {
75 87
     #
76 88
     # Grep recursively, keeping numbers and ignoring common dirs