Skip to content

Commit

Permalink
Remove command arg unquote in help command
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Apr 1, 2024
1 parent 59b52a7 commit 47c2210
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/irb/command/help.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ class Help < Base
category "Help"
description "List all available commands. Use `help <command>` to get information about a specific command."

def execute(arg)
def execute(command_name)
# Accept string literal for backward compatibility
command_name = unwrap_string_literal(arg)
content =
if command_name
if command_name.empty?
help_message
else
if command_class = ExtendCommandBundle.load_command(command_name)
command_class.help_message || command_class.description
else
"Can't find command `#{command_name}`. Please check the command name and try again.\n\n"
end
else
help_message
end
Pager.page_content(content)
end
Expand Down

0 comments on commit 47c2210

Please sign in to comment.