Commit 11da8e7c authored by Sebastian Ramacher's avatar Sebastian Ramacher

Include bash-completion

parent 752d408c
_zathura() {
_init_completion || return
local EXTS=""
for PLUGIN in @PLUGINDIR@/lib*.so; do
case ${PLUGIN##*/} in
libpdf-poppler.so)
EXTS="$EXTS|pdf"
;;
libpdf-mupdf.so)
EXTS="$EXTS|pdf|epub|oxps"
;;
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#|}"
}
complete -F _zathura zathura
......@@ -44,3 +44,13 @@ if appstream_util.found()
args: ['validate-relax', appdata.full_path()]
)
endif
conf_data = configuration_data()
conf_data.set('PLUGINDIR', join_paths(prefix, plugindir))
bash_completion = configure_file(
input: 'bash-completion.in',
output: 'zathura',
configuration: conf_data
)
install_data(bash_completion, install_dir: join_paths(datadir, 'bash-completion', 'completions'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment