zsh-workers
 help / color / mirror / code / Atom feed
* run-help and run-help-*
@ 2010-10-15 16:05 Jérôme Pouiller
  2010-10-17 23:37 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Jérôme Pouiller @ 2010-10-15 16:05 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: Text/Plain, Size: 328 bytes --]

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)

[-- Attachment #2: run-help-fix.patch --]
[-- Type: text/x-patch, Size: 403 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: run-help and run-help-*
  2010-10-15 16:05 run-help and run-help-* Jérôme Pouiller
@ 2010-10-17 23:37 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2010-10-17 23:37 UTC (permalink / raw)
  To: Jérôme Pouiller, zsh-workers

On Oct 15,  6:05pm, Jérôme Pouiller wrote:
}
}   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 <= $#

Already fixed by
    http://www.zsh.org/mla/workers/2009/msg01278.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-17 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-15 16:05 run-help and run-help-* Jérôme Pouiller
2010-10-17 23:37 ` Bart Schaefer

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