eog: New completion.

This commit is contained in:
Ville Skyttä 2012-06-24 20:40:17 +03:00
parent 7dd924b524
commit 3a1cdbdadc
4 changed files with 47 additions and 0 deletions

View File

@ -75,6 +75,7 @@ bashcomp_DATA = a2x \
dumpe2fs \
e2freefrag \
e2label \
eog \
ether-wake \
evince \
explodepkg \

27
completions/eog Normal file
View File

@ -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

1
test/completion/eog.exp Normal file
View File

@ -0,0 +1 @@
assert_source_completions eog

View File

@ -0,0 +1,18 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "eog "
sync_after_int
teardown