diff options
Diffstat (limited to 'completions/evince')
-rw-r--r-- | completions/evince | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/completions/evince b/completions/evince index 1c97dd9..49b67ac 100644 --- a/completions/evince +++ b/completions/evince @@ -1,32 +1,34 @@ # evince(1) completion -*- shell-script -*- -_evince() +_comp_cmd_evince() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[pil]*)' + # shellcheck disable=SC2254 case $prev in --help* | --sm-client-id | --class | --name | --screen | --gdk-debug | \ --gdk-no-debug | --gtk-module | --gtk-debug | --gtk-no-debug | --page-label | \ - --page-index | --find | --display | -!(-*)[hpil]) + --page-index | --find | --display | -${noargopts}[hpil]) return ;; --sm-client-state-file) - _filedir + _comp_compgen_filedir return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" --help-all)' -- "$cur")) + _comp_compgen_help -- --help-all [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir '@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2|.xz|.XZ)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)' + _comp_compgen_filedir '@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2|.xz|.XZ)|cb[7rtz]|djv?(u)|tif?(f)|?(o)xps)' } && - complete -F _evince evince + complete -F _comp_cmd_evince evince # ex: filetype=sh |