1 # grep through all files and open one in editor
3 # Directory to be searched can be set in ~/.config/iomenu/grep. They are
8 CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/iomenu"
13 while IFS='' read -r directory
15 find "$HOME/$directory" ! -path '*/.git/*' -type f |
17 cut -c $((${#HOME} + 2))-
18 done < "$CONFIG/grep" |
22 path="${reference%%:*}"
23 line="${reference#*:}"
26 exec ${VISUAL:-${EDITOR:-vim}} +"$line" "$HOME/$path"