From: Nicolas Boisselier Date: Tue, 11 Sep 2018 03:11:59 +0000 (+0100) Subject: etc/profile.d/functions X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=1dff80aa0f2bb3415e5f51fe31918cb7ea241555;p=nb.git etc/profile.d/functions --- diff --git a/etc/profile.d/functions b/etc/profile.d/functions index fd1e4354..dc643bae 100755 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -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() {