command tree -C "$@" | less
}
-# Choose the "best" PDF viewer available: zathura, then xpdf. Also setup
-# completion for `pdf`.
-if (( $+commands[zathura] )); then
+# Choose the "best" PDF viewer available: xpdf, then zathura (in the past
+# zathura was preferred, but recent versions are completely broken: still no
+# working search and no page-wise scrolling anymore). Also setup completion
+# for `pdf`.
+if (( $+commands[xpdf] )); then
pdf() {
- command zathura "$@" 2>/dev/null &
+ command xpdf "$@" 2>/dev/null &
disown %command
}
- # No completion for zathura yet.
compdef _xpdf pdf
-elif (( $+commands[xpdf] )); then
+elif (( $+commands[zathura] )); then
pdf() {
- command xpdf "$@" 2>/dev/null &
+ command zathura "$@" 2>/dev/null &
disown %command
}
+ # No completion for zathura yet.
compdef _xpdf pdf
fi