[download]

local/bin/devmenu

   1 #!/bin/bash
   2 
   3 cd ~
   4 
   5 start(){ # {{{
   6     while read _ _ _ _ i; do
   7         term "ranger '${i/\~/~}'" &
   8     done < <(
   9         column -ts $'\t' |
  10         menu -i dev -l 15
  11     )
  12 } # }}}
  13 
  14 find * -name \*.git 2>&- | while read i; do
  15     i=$PWD/${i%/.git}
  16     pushd "$i" > /dev/null
  17 
  18     cs=$(git log -1 --format=%cs)
  19     st=$(git st  2>&- | wc -l)
  20     up=$(git out 2>&- | wc -l)
  21     br=$(git symbolic-ref --short HEAD)
  22 
  23     printf '%s\t%s\t*%s\t+%s\t%s\t%s\n' "$cs" "$br" "$up" "$st" "${i/~/\~}"
  24     popd > /dev/null
  25 done | sort -r | start