zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _mpc search types
@ 2009-10-24  4:14 Clint Adams
  2009-10-24  4:37 ` Clint Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2009-10-24  4:14 UTC (permalink / raw)
  To: zsh-workers

It looks like _mpc needs a bit more modernization beyond this.

Index: Completion/Unix/Command/_mpc
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_mpc,v
retrieving revision 1.5
diff -u -r1.5 _mpc
--- Completion/Unix/Command/_mpc	4 Jan 2007 18:06:39 -0000	1.5
+++ Completion/Unix/Command/_mpc	24 Oct 2009 04:13:25 -0000
@@ -236,7 +236,7 @@
 
 _mpc_search() {
   local list expl
-  list=(album artist title filename)
+  list=(album artist title track name genre date composer performer comment disc filename any)
 
   if [[ $#words -eq 2 ]]; then
     _wanted list expl table compadd $expl -a list


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: _mpc search types
  2009-10-24  4:14 PATCH: _mpc search types Clint Adams
@ 2009-10-24  4:37 ` Clint Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Clint Adams @ 2009-10-24  4:37 UTC (permalink / raw)
  To: zsh-workers

On Sat, Oct 24, 2009 at 04:14:56AM +0000, Clint Adams wrote:
> It looks like _mpc needs a bit more modernization beyond this.

This adds missing ones and reorders the commands according to
the mpc 0.17 man page.  Notably this misses the findadd command
added in mpc 0.18.

Index: Completion/Unix/Command/_mpc
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_mpc,v
retrieving revision 1.6
diff -u -r1.6 _mpc
--- Completion/Unix/Command/_mpc	24 Oct 2009 04:17:40 -0000	1.6
+++ Completion/Unix/Command/_mpc	24 Oct 2009 04:32:01 -0000
@@ -26,36 +26,43 @@
 
   mpc_cmds=(
     add:"add a song to the current playlist"
+    clear:"clear the current playlist"
     crop:"remove all songs except for the currently playing song"
+    current:"show the currently playing song"
+    crossfade:"set and display crossfade settings"
     del:"remove a song from the current playlist"
-    play:"start playing"
-    next:"play the next song in the current playlist"
-    prev:"play the previous song in the current playlist"
-    pause:"pause the currently playing song"
-    toggle:"toggles Play/Pause, plays if stopped"
-    stop:"stop the currently playing playlists"
-    seek:"seek to the position specified in percent"
-    clear:"clear the current playlist"
-    outputs:"show the current outputs"
-    enable:"enable a output"
     disable:"disable a output"
-    shuffle:"shuffle the current playlist"
-    move:"move song in playlist"
-    playlist:"print the current playlist"
+    enable:"enable a output"
+    idle:"wait until an event occurs"
+    idleloop:"loop waiting for events"
     listall:"list all songs in the music directory"
+    load:"load file as a playlist"
     ls:"list the contents of specified directory"
     lsplaylists:"list currently available playlists"
-    load:"load file as a playlist"
-    save:"save a playlist to file"
-    rm:"remove a playlist"
-    volume:"set volume"
-    repeat:"toggle repeat mode, or specify state"
+    move:"move song in playlist"
+    next:"play the next song in the current playlist"
+    outputs:"show the current outputs"
+    pause:"pause the currently playing song"
+    play:"start playing"
+    playlist:"print the current playlist"
+    prev:"play the previous song in the current playlist"
     random:"toggle random mode, or specify state"
+    repeat:"toggle repeat mode, or specify state"
+    single:"toggle single mode, or specify state"
+    consume:"toggle consume mode, or specify state"
+    rm:"remove a playlist"
+    save:"save a playlist to file"
     search:"search for a song"
-    crossfade:"set and display crossfade settings"
-    update:"scan music directory for updates"
+    find:"search for a song, exact match"
+    list:"list all tags of given type"
+    seek:"seek to the position specified in percent"
+    shuffle:"shuffle the current playlist"
     stats:"display statistics about MPD"
+    stop:"stop the currently playing playlists"
+    toggle:"toggles Play/Pause, plays if stopped"
+    update:"scan music directory for updates"
     version:"report version of MPD"
+    volume:"set volume"
     status:"display MPD status"
   )
 
@@ -234,6 +241,14 @@
   _mpc_helper_bool
 }
 
+_mpc_single() {
+  _mpc_helper_bool
+}
+
+_mpc_consume() {
+  _mpc_helper_bool
+}
+
 _mpc_search() {
   local list expl
   list=(album artist title track name genre date composer performer comment disc filename any)
@@ -245,6 +260,14 @@
   fi
 }
 
+_mpc_find() {
+  _mpc_search "$@"
+}
+
+_mpc_list() {
+  _mpc_search "$@"
+}
+
 _mpc_update() {
   _mpc_helper_files
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-24  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-24  4:14 PATCH: _mpc search types Clint Adams
2009-10-24  4:37 ` Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).