summaryrefslogtreecommitdiff
path: root/completions/xmms
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-05-15 15:07:06 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-05-15 15:07:06 +0300
commit8eec0ecf5212b28a6f2d1d45a2ec303926503d2a (patch)
tree725e0656bd47894392e75241be5fc892ec2ff676 /completions/xmms
parent68f7fa16b0db6b744495e3fa70819e9ed90ca0bf (diff)
downloadbash-completion-8eec0ecf5212b28a6f2d1d45a2ec303926503d2a.tar.gz
xmms: Use _parse_help, add some option argument completions.
Diffstat (limited to 'completions/xmms')
-rw-r--r--completions/xmms20
1 files changed, 13 insertions, 7 deletions
diff --git a/completions/xmms b/completions/xmms
index 82473b0d..933c949a 100644
--- a/completions/xmms
+++ b/completions/xmms
@@ -4,17 +4,23 @@ have xmms || return
_xmms()
{
- local cur prev words cword
- _init_completion || return
+ 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
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '-h --help -r --rew -p --play \
- -u --pause -s --stop -t --play-pause -f --fwd -e \
- --enqueue -m --show-main-window -i --sm-client-id \
- -v --version' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
else
_filedir '@(mp[23]|ogg|wav|pls|m3u|xm|mod|s[3t]m|it|mtm|ult|flac)'
-
fi
} &&