Fix #94 by changing the line in question to ignore the command argument when searching for command name. Just take the longest valid command name found in the arguments.
Considerations
This also changes the behaviour of the help command in its alternate form. This will ignore the argument and provide the documentation for the specified command, where previously it would give an error message.
Context
It is reported in #94 that using
--help
after a command name and command argument does not work.Investigation finds the
help
command is assuming the the command name is all the arguments joined together.https://github.com/commander-rb/commander/blob/b8abd42153118ca9fdc02affeb9f3aab61cda5a2/lib/commander/runner.rb#L307
Change
Fix #94 by changing the line in question to ignore the command argument when searching for command name. Just take the longest valid command name found in the arguments.
Considerations
This also changes the behaviour of the help command in its alternate form. This will ignore the argument and provide the documentation for the specified command, where previously it would give an error message.