diff --git a/.bin/fzf-book b/.bin/fzf-book index be78542..60792d7 100755 --- a/.bin/fzf-book +++ b/.bin/fzf-book @@ -7,5 +7,7 @@ # selected="$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1 --preview 'pdfinfo {}' --preview-window=right:70%:wrap)" selected="$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1)" -# Open and redirect output to /dev/null -zathura "$selected" --fork +echo "Opening \"$selected\"" + +# Open when a file is selected and redirect output to /dev/null +[[ -n "$selected" ]] && zathura "$selected" --fork &> /dev/null