34 lines
738 B
Plaintext
Raw Normal View History

2009-05-17 22:08:47 +02:00
# bash completion for xmms
_xmms()
{
local cur prev words cword split
_init_completion -s || return
case $prev in
-h|--help|-v|--version)
return
;;
-S|--toggle-shuffle|-R|--toggle-repeat|-A|--toggle-advance)
COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
return
;;
esac
2009-05-17 22:08:47 +02:00
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
2009-10-04 19:42:50 +02:00
else
_filedir '@(mp[23]|ogg|wav|pls|m3u|xm|mod|s[3t]m|it|mtm|ult|flac)'
2009-10-04 19:42:50 +02:00
fi
2009-05-17 22:08:47 +02:00
} &&
complete -F _xmms xmms
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh