shift
grep -i -- "$*" $LIST
elif [ "$ITEM" == "--watch" ]; then
- (
- cd $DOCS
-
- while inotifywait -e modify -e create -e move -e delete .; do
- $PROGRAM --refresh
- done
- )
+ # Convert symlink to full path and start inotifywait loop
+ #while inotifywait -e modify -e create -e move -e delete -r "`readlink -f $DOCS`"; do
+ while inotifywait -e modify -e move -r "`readlink -f $DOCS`"; do
+ $PROGRAM --refresh
+ done
else
grep -i -- "$ITEM" $LIST | while read entry; do
echo "Opening $entry..."