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.