Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[andyetitmoves@xxxxxxxxx: Bug#405578: zsh: Glob fix to parse playlist output from newer mpc]



----- Forwarded message from "R.Ramkumar" <andyetitmoves@xxxxxxxxx> -----

Hi!

The playlist output for mpc was recently slightly modified. This
upset the completion code. Here is a small patch to allow for the
change (This works for older versions as well, I just needed to
relax the glob pattern).


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Content-Description: Glob fix to parse playlist output from newer mpc
--- _mpc.orig	2007-01-04 22:49:22.909590520 +0530
+++ _mpc	2007-01-04 22:41:11.953227232 +0530
@@ -95,7 +95,7 @@
   out=("${(@f)$(_call_program song-numbers mpc $foo playlist 2>/dev/null)}")
   out=("${(@M)out[@]:#${~MATCH}}")
 
-  sn=("${(@)${(@M)out}//(#b)(#s)\#([0-9]#)*/$match[1]}")
+  sn=("${(@)${(@M)out}//(#b)(#s)(\#|[ >]#)([0-9]#)*/$match[2]}")
   list=("${(@Mr:COLUMNS-1:)out}")
 
   _wanted -V 'song numbers' expl 'song number' \


Regards,
Ramkumar.



Messages sorted by: Reverse Date, Date, Thread, Author