Handle 'non selections'
This commit is contained in:
@@ -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 --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)"
|
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
|
echo "Opening \"$selected\""
|
||||||
zathura "$selected" --fork
|
|
||||||
|
# Open when a file is selected and redirect output to /dev/null
|
||||||
|
[[ -n "$selected" ]] && zathura "$selected" --fork &> /dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user