2018-05-22 09:21:14 +02:00
|
|
|
_zathura() {
|
2021-09-05 23:26:14 +02:00
|
|
|
_init_completion 2>/dev/null || true
|
2018-05-22 09:21:14 +02:00
|
|
|
|
|
|
|
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)
|
2021-09-05 23:29:59 +02:00
|
|
|
EXTS="$EXTS|pdf|PDF|epub|oxps|xhtml"
|
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
|
|
|
|
|
2021-09-05 23:26:14 +02:00
|
|
|
_filedir "${EXTS#|}" 2>/dev/null || COMPREPLY=($(shopt -s extglob; compgen -f -X "!*.@($EXTS)"))
|
2018-05-22 09:21:14 +02:00
|
|
|
}
|
|
|
|
complete -F _zathura zathura
|