2018-05-22 09:21:14 +02:00
|
|
|
_zathura() {
|
|
|
|
_init_completion || return
|
|
|
|
|
|
|
|
local EXTS=""
|
|
|
|
for PLUGIN in @PLUGINDIR@/lib*.so; do
|
|
|
|
case ${PLUGIN##*/} in
|
|
|
|
libpdf-poppler.so)
|
2019-02-03 15:28:08 +01:00
|
|
|
EXTS="$EXTS|pdf|PDF"
|
2018-05-22 09:21:14 +02:00
|
|
|
;;
|
|
|
|
libpdf-mupdf.so)
|
2019-02-03 15:28:08 +01:00
|
|
|
EXTS="$EXTS|pdf|PDF|epub|oxps"
|
2018-05-22 09:21:14 +02:00
|
|
|
;;
|
|
|
|
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"
|
|
|
|
;;
|
2019-02-03 15:28:00 +01:00
|
|
|
esac
|
2018-05-22 09:21:14 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
_filedir "${EXTS#|}"
|
|
|
|
}
|
|
|
|
complete -F _zathura zathura
|