summaryrefslogtreecommitdiff
blob: 1568d3ca5e1f72f073f11b0813286f00cda33659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# $Header: /var/cvsroot/gentoo-x86/media-sound/xmmsctrl/files/xmmsctrl.bash-completion,v 1.1 2004/11/04 23:22:33 eradicator Exp $
# xmmsctrl completion

_xmmsctrl()
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="launch not cur eject getlength getpos gettime getvol help jump \
    next pause play playlist playfiles pref prev previous remove repeat \
    shuffle stop title quit --help equalizer main play_list paused playing \
    is_equalizer is_main is_play_list is_stream running session dir time \
    track vol"

    if [ ${COMP_CWORD} -eq 1 ] ; then
	COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
	return 0
    fi

    case "${prev}" in
	equalizer|main|play_list)
	    COMPREPLY=($(compgen -W "0 1" -- "${cur}"))
	    ;;
	dir)
	    COMPREPLY=($(compgen -A directory -- "${cur}"))
	    ;;
	not)
	    COMPREPLY=($(compgen -W "${opts/not}" -- "${cur}"))
	    ;;
	*)
	    COMPREPLY=()
	    ;;
    esac
}
complete -F _xmmsctrl xmmsctrl

# vim: set ft=sh tw=80 sw=4 et :