Handle 'non selections'

master
Hektor Misplon 2022-12-02 13:27:32 +01:00
parent 54b27b95b6
commit f2c3f16a63
1 changed files with 4 additions and 2 deletions

View File

@ -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