From: Charles Bailey Date: Sat, 19 Jul 2014 18:29:50 GMT Subject: Re: [PATCH 2/2] difftool: don't assume that default sh is sane Message-ID: <20140719182950.GA31037@hashpling.org> In-Reply-To: <20140719172132.GB26927@serenity.lan> 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.