[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-355-g5681ec1
Ville Skyttä
ville.skytta at iki.fi
Wed Jun 8 21:34:36 UTC 2011
The following commit has been merged in the master branch:
commit 5681ec1ac90a13dbfd7e8b36f86abf31629e6240
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Thu Jun 9 00:33:57 2011 +0300
evince: Split into separate file, add option completions.
diff --git a/bash_completion b/bash_completion
index 6aeb9ca..1d34b16 100644
--- a/bash_completion
+++ b/bash_completion
@@ -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
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 4b08f41..60fa8ea 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -41,6 +41,7 @@ bashcomp_DATA = abook \
dsniff \
dvd+rw-tools \
e2fsprogs \
+ evince \
findutils \
freeciv \
freerdp \
diff --git a/completions/evince b/completions/evince
new file mode 100644
index 0000000..93f35bd
--- /dev/null
+++ b/completions/evince
@@ -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
--
bash-completion
More information about the Bash-completion-commits
mailing list