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

PATCH: icky typo in zsh-mime-handler



This made handlers with special characters in (in particular quotes)
fail.  Not sure how this didn't get picked up (but quite clearly my
fault).

Index: Functions/MIME/zsh-mime-handler
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/MIME/zsh-mime-handler,v
retrieving revision 1.12
diff -p -u -r1.12 zsh-mime-handler
--- Functions/MIME/zsh-mime-handler	23 May 2010 19:54:03 -0000	1.12
+++ Functions/MIME/zsh-mime-handler	8 Aug 2010 16:32:11 -0000
@@ -188,9 +188,9 @@ if [[ $handler = *%s* ]]; then
       # Probably we ought not even to handle multiple
       # arguments, but at least the error message ought
       # to make it obvious what's going on.
-      zformat -f command $handler s:"$argv[0]"
+      zformat -f command $handler s:"$argv[1]"
     else
-      zformat -f command $handler s:"${(q)argv[0]}"
+      zformat -f command $handler s:"${(q)argv[1]}"
     fi
     if (( list )); then
       execargs=(${(Q)${(z)command}} ${argv[1,-1]})

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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