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

PATCH: run-help unquoting



Unquoting in run-help is incomplete: it does it for the purposes of
"whence", but not for running "man" etc. on the result.

Index: Functions/Misc/run-help
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Misc/run-help,v
retrieving revision 1.5
diff -u -r1.5 run-help
--- Functions/Misc/run-help	1 Nov 2005 18:25:06 -0000	1.5
+++ Functions/Misc/run-help	13 Oct 2006 22:20:55 -0000
@@ -41,6 +41,9 @@
 if [[ $places = *"not found"* && $1 != ${(Q)1} ]]; then
   # Different when unquoted, so try stripping quotes.
   places=( "${(@f)$(builtin whence -va ${(Q)1})}" )
+  if (( ${#places} )); then
+      set -- "${(Q)@}"
+  fi
   # Quotation is significant to aliases, so suppress lookup.
   noalias=1
 fi

-- 
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