diff options
-rwxr-xr-x | show | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4,6 +4,7 @@ # # Parameters +PROGRAM="$0" BASENAME="`basename $0`" DOCS="$HOME/data/doc" FILELIST=".filelist" @@ -59,6 +60,14 @@ fi if [ "$ITEM" == "--search" ]; then shift grep -i -- "$*" $LIST +elif [ "$ITEM" == "--watch" ]; then + ( + cd $DOCS + + while inotifywait -e modify -e create -e move -e delete .; do + $PROGRAM --refresh + done + ) else grep -i -- "$ITEM" $LIST | while read entry; do echo "Opening $entry..." |