evince: Split into separate file, add option completions.
This commit is contained in:
parent
0a3029ac49
commit
5681ec1ac9
@ -1758,7 +1758,6 @@ _install_xspec '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' xdvi kdvi
|
||||
_install_xspec '!*.dvi' dvips dviselect dvitype dvipdf advi dvipdfm dvipdfmx
|
||||
_install_xspec '!*.[pf]df' acroread gpdf xpdf
|
||||
_install_xspec '!*.@(?(e)ps|pdf)' kpdf
|
||||
_install_xspec '!*.@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)' evince
|
||||
_install_xspec '!*.@(okular|@(?(e|x)ps|?(E|X)PS|[pf]df|[PF]DF|dvi|DVI|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|epub|EPUB|odt|ODT|fb?(2)|FB?(2)|mobi|MOBI|g3|G3|chm|CHM)?(.?(gz|GZ|bz2|BZ2)))' okular
|
||||
_install_xspec '!*.pdf' epdfview
|
||||
_install_xspec '!*.@(?(e)ps|pdf)' ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr
|
||||
|
@ -41,6 +41,7 @@ bashcomp_DATA = abook \
|
||||
dsniff \
|
||||
dvd+rw-tools \
|
||||
e2fsprogs \
|
||||
evince \
|
||||
findutils \
|
||||
freeciv \
|
||||
freerdp \
|
||||
|
39
completions/evince
Normal file
39
completions/evince
Normal file
@ -0,0 +1,39 @@
|
||||
have evince || return
|
||||
|
||||
_evince()
|
||||
{
|
||||
local cur prev words cword split
|
||||
_init_completion -s || return
|
||||
|
||||
case $prev in
|
||||
--help*|-h|--sm-client-id|--class|--name|--screen|--gdk-debug|\
|
||||
--gdk-no-debug|--gtk-module|--gtk-debug|--gtk-no-debug|\
|
||||
-p|--page-label|-i|--page-index|-l|--find|--display)
|
||||
return
|
||||
;;
|
||||
--sm-client-state-file)
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
$split && return 0
|
||||
|
||||
if [[ $cur == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help-all )' \
|
||||
-- "$cur" ) )
|
||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||
return
|
||||
fi
|
||||
|
||||
_filedir '@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)'
|
||||
} &&
|
||||
complete -F _evince evince
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
# sh-indent-comment: t
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
Loading…
x
Reference in New Issue
Block a user