]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/functions
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 11 Sep 2018 03:11:59 +0000 (04:11 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 11 Sep 2018 03:11:59 +0000 (04:11 +0100)
etc/profile.d/functions

index fd1e4354ab17633defec963fa80ee63124230444..dc643bae5d448540b207588c25b04b1859dc2695 100755 (executable)
@@ -55,7 +55,16 @@ nb_repos_ls() {
 }
 
 nb_repos_grep() {
-       grep $@ `nb_repos`
+# NB 11.09.18  local count=0
+# NB 11.09.18  local lines=100
+       nb_repos_ls_files | while read i; do
+# NB 11.09.18          count=$(($count+1))
+# NB 11.09.18          if [ $count -gt $lines ]; then
+# NB 11.09.18                  count=0
+# NB 11.09.18          fi
+# NB 11.09.18          echo "$count $i"
+               grep $@ "$i"
+       done
 }
 
 nb_repos_ls_files() {