2011-11-01 22:14:45 +02:00
|
|
|
# bash completion for xmms -*- shell-script -*-
|
2009-05-17 22:08:47 +02:00
|
|
|
|
|
|
|
_xmms()
|
|
|
|
{
|
2011-05-15 15:07:06 +03:00
|
|
|
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
|
2011-05-15 15:07:06 +03:00
|
|
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
2009-10-04 19:42:50 +02:00
|
|
|
else
|
2010-09-19 12:29:29 +03:00
|
|
|
_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
|
|
|
|
|
|
|
} &&
|
2010-11-01 19:26:53 +02:00
|
|
|
complete -F _xmms xmms
|
2009-10-01 20:54:51 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|