From: Silvio Rhatto Date: Thu, 15 Apr 2021 22:30:38 +0000 (-0300) Subject: Fix: show --watch: inotifywait params X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=561d25be18529a18b9651b01f7ce6814064ada53;p=scripts.git Fix: show --watch: inotifywait params --- diff --git a/show b/show index 2195702..2815aad 100755 --- a/show +++ b/show @@ -61,13 +61,11 @@ 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 - ) + # 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..."