wine: Complete all files after an .exe (Alioth #313131)
This commit is contained in:
parent
82784121d8
commit
43e8e2b504
@ -1847,7 +1847,6 @@ _install_xspec '!*.@(mid?(i)|cmf)' playmidi
|
||||
_install_xspec '!*.@(mid?(i)|rmi|rcp|[gr]36|g18|mod|xm|it|x3m|s[3t]m|kar)' timidity
|
||||
_install_xspec '!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|okta|p[st]m|s[3t]m|ult|umx|wav|xm)' modplugplay modplug123
|
||||
_install_xspec '*.@(o|so|so.!(conf)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite
|
||||
_install_xspec '!*.@([eE][xX][eE]?(.[sS][oO])|[cC][oO][mM]|[sS][cC][rR])' wine
|
||||
_install_xspec '!*.@(zip|z|gz|tgz)' bzme
|
||||
# konqueror not here on purpose, it's more than a web/html browser
|
||||
_install_xspec '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx opera galeon dillo elinks amaya firefox mozilla-firefox iceweasel google-chrome chromium-browser epiphany
|
||||
|
@ -305,6 +305,7 @@ bashcomp_DATA = a2x \
|
||||
vpnc \
|
||||
watch \
|
||||
webmitm \
|
||||
wine \
|
||||
withlist \
|
||||
wodim \
|
||||
wol \
|
||||
|
20
completions/wine
Normal file
20
completions/wine
Normal file
@ -0,0 +1,20 @@
|
||||
# bash completion for wine(1) -*- shell-script -*-
|
||||
|
||||
_wine()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
if [[ "$cword" -eq 1 ]]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $(compgen -W '--help --version' -- "$cur") )
|
||||
[[ $COMPREPLY ]] && return
|
||||
fi
|
||||
_filedir '[eE][xX][eE]?(.[sS][oO])|[cC][oO][mM]|[sS][cC][rR]'
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
} &&
|
||||
complete -F _wine wine
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
1
test/completion/wine.exp
Normal file
1
test/completion/wine.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions wine
|
31
test/lib/completions/wine.exp
Normal file
31
test/lib/completions/wine.exp
Normal file
@ -0,0 +1,31 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified {/OLDPWD=/d}
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
set test "should complete *.exe, *.com files and dirs"
|
||||
set dir $::srcdir/fixtures/shared/default
|
||||
assert_complete_dir {"bar bar.d/" foo.d/} "wine " $dir $test
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
set test "should complete any files and dirs after executable"
|
||||
set dir $::srcdir/fixtures/shared/default
|
||||
set files {bar "bar bar.d/" foo foo.d/}
|
||||
assert_complete_dir $files "wine notepad " $dir $test
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
x
Reference in New Issue
Block a user