mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 14:16:01 +01:00
120a33d116
MuPDF supports xhtml files so let them by autocompleted too.
28 lines
641 B
Bash
28 lines
641 B
Bash
#!/bin/bash
|
|
_zathura() {
|
|
_init_completion 2>/dev/null || true
|
|
|
|
local EXTS=""
|
|
for PLUGIN in @PLUGINDIR@/lib*.so; do
|
|
case ${PLUGIN##*/} in
|
|
libpdf-poppler.so)
|
|
EXTS="$EXTS|pdf|PDF"
|
|
;;
|
|
libpdf-mupdf.so)
|
|
EXTS="$EXTS|pdf|PDF|epub|oxps|xhtml"
|
|
;;
|
|
libps.so)
|
|
EXTS="$EXTS|ps|eps|epsi|epsf"
|
|
;;
|
|
libdjvu.so)
|
|
EXTS="$EXTS|djvu|djv"
|
|
;;
|
|
libcb.so)
|
|
EXTS="$EXTS|cb7|cbr|cbz|cbt|rar|zip|7z|tar"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
_filedir "${EXTS#|}" 2>/dev/null || COMPREPLY=($(shopt -s extglob; compgen -f -X "!*.@($EXTS)"))
|
|
}
|
|
complete -F _zathura zathura
|