Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B #6481: Modification on onecfg help in order not to show version parameter #6544

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions src/cli/command_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ module CommandParser
:short => "-h",
:large => "--help",
:description => "Show this message"
},
VERSION={
:name => "version",
:short => "-V",
:large => "--version",
:description => "Show version and copyright information",
}
}#,
#VERSION={
# :name => "version",
# :short => "-V",
# :large => "--version",
# :description => "Show version and copyright information",
#}
]

class CmdParser
Expand Down Expand Up @@ -93,9 +93,9 @@ def usage(str)

# Defines the version the command
# @param [String] str
def version(str)
@version = str
end
#def version(str)
# @version = str
#end

# Defines the additional information of the command
# @param [String] str
Expand Down Expand Up @@ -515,9 +515,6 @@ def parse(extra_options)
elsif e[:name]=="help"
print_help
exit 0
elsif e[:name]=="version"
puts @version
exit 0
elsif !e[:multiple]
@options[e[:name].to_sym]=o
else
Expand Down Expand Up @@ -650,10 +647,6 @@ def print_all_commands_help
puts
print_formatters
puts
if @version
puts "## VERSION"
puts @version
end
end

def print_command_help(name)
Expand Down