about summary refs log tree commit diff
path: root/Completion/Unix/Command/_mpc
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2018-06-21 13:28:24 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-06-21 13:28:24 +0200
commitafd008d96bee0993ebbca697f93917b0897207bd (patch)
tree3956ca61a7affbdfe26ccd61e43cb66e5f8f623e /Completion/Unix/Command/_mpc
parent394f3a47e464b67b17e2cb7166df066829250e88 (diff)
downloadzsh-afd008d96bee0993ebbca697f93917b0897207bd.tar.gz
zsh-afd008d96bee0993ebbca697f93917b0897207bd.tar.xz
zsh-afd008d96bee0993ebbca697f93917b0897207bd.zip
43073: various completion option updates
Diffstat (limited to 'Completion/Unix/Command/_mpc')
-rw-r--r--Completion/Unix/Command/_mpc18
1 files changed, 17 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_mpc b/Completion/Unix/Command/_mpc
index 45d93550d..4f200c69e 100644
--- a/Completion/Unix/Command/_mpc
+++ b/Completion/Unix/Command/_mpc
@@ -37,6 +37,7 @@ _mpc_command() {
     disable:"disable an output"
     enable:"enable an output"
     toggleoutput:"toggle an output"
+    outputset:"set output attributes"
     idle:"wait until an event occurs"
     idleloop:"loop waiting for events"
     insert:"insert a song after the currently playing song in the playlist"
@@ -73,6 +74,7 @@ _mpc_command() {
     stop:"stop the currently playing playlists"
     toggle:"toggles Play/Pause, plays if stopped"
     update:"scan music directory for updates"
+    rescan:"rescan music directory (including unchanged files)"
     version:"report version of MPD"
     volume:"set volume"
     status:"display MPD status"
@@ -222,6 +224,16 @@ _mpc_toggleoutput() {
   _mpc_helper_outputs
 }
 
+_mpc_outputset() {
+  if (( CURRENT == 2 )); then
+    _mpc_helper_outputs
+  else
+    _values -w -S = attribute \
+      'dop:setting:(1 0)' \
+      'allowed_formats:formats'
+  fi
+}
+
 _mpc_move() {
   if (( $#words <= 3 )); then
     _mpc_helper_songnumbers
@@ -318,6 +330,10 @@ _mpc_update() {
   _mpc_helper_files
 }
 
+_mpc_rescan() {
+  _mpc_helper_files
+}
+
 if [[ $service = *MPD_HOST* ]]; then
   _hosts
   return
@@ -339,7 +355,7 @@ if [[ $state = formats ]]; then
   compset -P '([^%]|%[^%]#%)#'
   _wanted metadata expl 'metadata delimiter' compadd -p % -S % \
     artist album albumartist comment composer date disc genre performer title \
-    track time file position mtime mdate && ret=0
+    track time file position id prio mtime mdate && ret=0
 fi
 
 return ret