Skip to content

Commit

Permalink
B #6481: Modification on onecfg help in order not to show version par…
Browse files Browse the repository at this point in the history
…ameter

Signed-off-by: 31ldtsON <[email protected]>
  • Loading branch information
31ldtsON committed Mar 18, 2024
1 parent 57efabf commit 69112ef
Showing 1 changed file with 10 additions and 17 deletions.
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

0 comments on commit 69112ef

Please sign in to comment.