Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH 2/2] difftool: don't assume that default sh is sane

From: Charles Bailey <hidden>
Date: 2016-06-15 23:01:59

On Sat, Jul 19, 2014 at 06:21:32PM +0100, John Keeping wrote:
What's the reason for forcing `--tool-help` to be the last option?
Wouldn't it be simpler to just change the top-level case statement to:

	--tool-help=*)
		TOOL_MODE=${1#--tool-help=}
		show_tool_help
		;;
	--tool-help)
		show_tool_help
		;;
It doesn't make sense to use --tool-help with other parameters so issuing
an error made sense to me at the time. You've pointed out to me that I
don't error when those other options come first so I'm now unsure how
valuable this behaviour is, now. (I can't immediately see a really neat way
to give a diagnostic if other options do come first.)

Your version is good, obviously simpler.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help