Still broken, slightly less. Will import code from iode.
[iomenu.git] / io-grep
blob42675e54db48f67dadf402ae46babe4ff8c9d8ba
1 directory="$(
2         cd "$HOME"
3         find . -type d ! -path '*/.git/*' ! -name '.git' |
4                 sed 's/^./~/' | iomenu -l 256
5 )"
7 directory="$HOME${directory#\~}"
9 grep -rL '\x00' "$directory" | while IFS='' read -r path
11         printf '#io-grep %s\n' "~${path#$HOME}"
12         cat "$path"
13 done | iomenu -s '#io-grep' -H -N -l 256 | {
14         IFS='   ' read -r path line
15         exec $PAGER +"$line"g "$HOME${path#\~}"