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

run-help and run-help-*



Dear Zsh Workers

I noticed if:
  1. I use run-help module
  2. I use run-help-git functions (also work all run-help-* functions)
  3. I launch "run-help git"

then run-help function loop with error:
   run-help:shift:102: shift count must be <= $#

Patch in attachment fix this issue.

-- 
Jérôme Pouiller (Jezz)
--- /usr/share/zsh/functions/Misc/run-help.orig	2010-04-19 04:26:23.000000000 +0200
+++ /usr/share/zsh/functions/Misc/run-help	2010-10-15 17:54:53.249384368 +0200
@@ -97,7 +97,7 @@
 		builtin print -z "$cmd_args"
 		cmd_args=( ${(z)cmd_args} )
 		# Discard environment assignments, etc.
-		while [[ $cmd_args[1] != $1 ]]
+		while [[ $cmd_args[1] != $1 && $# -gt 1 ]]
 		do
 		    shift cmd_args
 		done


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