eog: New completion.
This commit is contained in:
parent
7dd924b524
commit
3a1cdbdadc
@ -75,6 +75,7 @@ bashcomp_DATA = a2x \
|
||||
dumpe2fs \
|
||||
e2freefrag \
|
||||
e2label \
|
||||
eog \
|
||||
ether-wake \
|
||||
evince \
|
||||
explodepkg \
|
||||
|
27
completions/eog
Normal file
27
completions/eog
Normal 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
1
test/completion/eog.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions eog
|
18
test/lib/completions/eog.exp
Normal file
18
test/lib/completions/eog.exp
Normal file
@ -0,0 +1,18 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "eog "
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
x
Reference in New Issue
Block a user