1 #compdef cmus cmus-remote
3 local expl cmus_commands
6 add bind browser-up cd clear colorscheme echo factivate
7 filter fset invert load mark player-next player-pause
8 player-play quit refresh run save search-next search-prev
9 seek set showbind shuffle source toggle unbind unmark view
10 vol win-activate win-add-l win-add-p win-add-Q win-add-q
11 win-bottom win-down win-mv-after win-mv-before win-next
12 win-page-down win-page-up win-remove win-sel-cur
13 win-toggle win-top win-up win-update
18 _wanted list expl volume compadd $expl - {0..100}
24 '--server[connect using socket SOCKET]:socket:_files' \
25 '--help[display this help and exit]:' \
26 '--version[Display version information and exit.]:' \
27 '(--play -p)'{--play,-p}'[Start playing.]:' \
28 '(--pause -u)'{--pause,-u}'[Toggle pause.]:' \
29 '(--stop -s)'{--stop,-s}'[Stop playing.]:' \
30 '(--next -n)'{--next,-n}'[Skip forward in playlist.]:' \
31 '(--prev -r)'{--prev,-r}'[Skip backward in playlist.]:' \
32 '(--repeat -R)'{--repeat,-R}'[Toggle repeat.]:' \
33 '(--shuffle -S)'{--shuffle,-S}'[Toggle shuffle.]:' \
34 '(--volume -v)'{--volume,-V+}'[Change volume. See vol command in cmus(1).]:volume:_cmus_volume' \
35 '(--seek -k)'{--seek,-k+}'[Seek. See seek command in cmus(1).]:seek [+-]<num>[m/h]'\
36 '(--library -l)'{--library,-l+}'[Modify library instead of playlist.]:playlists/files/directories/URLs:_files'\
37 '(--playlist -P)'{--playlist,-P}'[Modify playlist (default).]::Playlist:_files'\
38 '(--queue -q)'{--queue,-q}'[Modify play queue instead of playlist.]:'\
39 '(--clear -c)'{--clear,-c}'[Clear playlist, library (-l) or play queue (-q).]:playlist'\
40 '(--raw -C)'{--raw,-C+}'[Treat arguments (instead of stdin) as raw commands.]:command:(${cmus_commands[@]}):'\
44 '--listen[listen on ADDR instead of ~/.cmus/socket]:socket:_files' \
45 '--plugins[list available plugins and exit]' \
46 '--help[display this help and exit]' \
47 '--version[display version information]'