add completions for mpc

This commit is contained in:
Aaron Bieber 2020-08-19 22:31:53 +00:00
parent 4cbf7e178d
commit a4b8901a91
3 changed files with 28 additions and 2 deletions

25
completions/mpc.ksh Executable file
View File

@ -0,0 +1,25 @@
set -A complete_mpc_1 -- \
add \
cdprev channels clear clearerror \
consume crop crossfade current \
del disable \
enable \
find findadd \
idle idleloop insert \
list listall load ls lsplaylists \
mixrampdb mixrampdelay move \
next \
outputs outputset \
pause pause-if-playing play playlist prev prio \
random repeat replaygain rescan rm \
save search searchadd searchplay seek \
sendmessage shuffle single stats \
sticker stop subscribe \
toggle toggleoutput \
update \
version volume \
waitmessage \
pgrep -fq '/usr/local/sbin/mpd'
if [ $? = 0 ]; then
set -A complete_mpc_2 -- $(mpc lsplaylists | sort)
fi

0
completions/mpc.org Normal file
View File

View File

@ -1,6 +1,7 @@
#: | vmd | vmctl commands and VM names |
pgrep -fq '/usr/sbin/vmd'
if [ $? = 0 ]; then
set -A complete_vmctl -- console load reload start stop reset status send receive
set -A complete_vmctl_2 -- $(vmctl status | awk '!/NAME/{print $NF}')
set -A complete_vmctl_1 -- console load reload start stop reset status send receive
set -A complete_vmctl -- $(vmctl status | awk '!/NAME/{print $NF}')
fi