From de0cc59a651555ff413eb56d2443b020136a77ad Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 1 Oct 2012 16:53:14 +0200 Subject: [PATCH] feature #1383: Use the first usage word for name if it is not defined --- src/cli/command_parser.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/command_parser.rb b/src/cli/command_parser.rb index 9d7b4222cd..3f34026087 100644 --- a/src/cli/command_parser.rb +++ b/src/cli/command_parser.rb @@ -75,7 +75,8 @@ module CommandParser # Defines the usage information of the command # @param [String] str def usage(str) - @usage=str + @usage = str + @name ||= @usage.split(' ').first end # Defines the version the command