[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-2-gbffce42
Ville Skyttä
ville.skytta at iki.fi
Mon Jun 25 14:44:30 UTC 2012
The following commit has been merged in the master branch:
commit 3a1cdbdadc92e041b3b446f4d40d5ffcabe86d4e
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Jun 24 20:40:17 2012 +0300
eog: New completion.
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 0a24d0c..2a884e9 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -75,6 +75,7 @@ bashcomp_DATA = a2x \
dumpe2fs \
e2freefrag \
e2label \
+ eog \
ether-wake \
evince \
explodepkg \
diff --git a/completions/eog b/completions/eog
new file mode 100644
index 0000000..6da35e1
--- /dev/null
+++ b/completions/eog
@@ -0,0 +1,27 @@
+# eog(1) completion -*- shell-script -*-
+
+_eog()
+{
+ local cur prev words cword split
+ _init_completion -s || return
+
+ case $prev in
+ -'?'|--help|--help-all|--help-gtk)
+ return
+ ;;
+ esac
+
+ $split && return
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help-all )' \
+ -- "$cur" ) )
+ [[ $COMPREPLY == *= ]] && compopt -o nospace
+ return
+ fi
+
+ _filedir '@(ani|?(w)bmp|gif|ico|j2k|jp[cefgx2]|jpeg|pcx|pn[gm]|ras|svg?(z)|tga|tif?(f)|x[bp]m)'
+} &&
+complete -F _eog eog
+
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/eog.exp b/test/completion/eog.exp
new file mode 100644
index 0000000..bba2349
--- /dev/null
+++ b/test/completion/eog.exp
@@ -0,0 +1 @@
+assert_source_completions eog
diff --git a/test/lib/completions/pwd.exp b/test/lib/completions/eog.exp
similarity index 81%
copy from test/lib/completions/pwd.exp
copy to test/lib/completions/eog.exp
index f40fdb9..b708c56 100644
--- a/test/lib/completions/pwd.exp
+++ b/test/lib/completions/eog.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_no_complete "pwd "
+assert_complete_any "eog "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list