zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: run-help unquoting
@ 2006-10-13 22:21 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2006-10-13 22:21 UTC (permalink / raw)
  To: Zsh hackers list

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@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-13 22:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-13 22:21 PATCH: run-help unquoting Peter Stephenson

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