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

Revamp help command #877

Merged
merged 5 commits into from
Feb 18, 2024
Merged

Revamp help command #877

merged 5 commits into from
Feb 18, 2024

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Feb 16, 2024

  1. It's now a standalone command implementation and show_cmds is simply an alias to it

  2. All references to show_cmds are now made to help

  3. It now supports help <cmd> to display the command's new help_message attribute OR description if its help message is not set

    • Example: Screenshot 2024-02-16 at 21 51 34
  4. I added help_message to edit and ls commands and tweaked their description a bit

@st0012 st0012 added the enhancement New feature or request label Feb 16, 2024
Usage: `help [command]`

If the command is not specified, it will display a list of all available commands.

If the command is specified, it will display the banner OR description of the command.

If the command is not found, it will display a message saying that the command is not found.
@st0012 st0012 force-pushed the add-command-banner branch from 831eeb9 to 693d413 Compare February 16, 2024 21:48
@st0012 st0012 changed the title Revamp help command Revamp help command Feb 17, 2024
lib/irb/command/edit.rb Outdated Show resolved Hide resolved
lib/irb/command/base.rb Outdated Show resolved Hide resolved
1. Make `show_cmds` an alias of `help` so it's not displayed in the help message
2. Update description of the help command to reflect `help <command>` syntax
@st0012 st0012 force-pushed the add-command-banner branch from 693d413 to 90eb545 Compare February 17, 2024 18:55
@st0012 st0012 requested a review from tompng February 17, 2024 21:56
Copy link
Member

@tompng tompng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@st0012 st0012 merged commit 43a2c99 into master Feb 18, 2024
57 checks passed
@st0012 st0012 deleted the add-command-banner branch February 18, 2024 18:21
matzbot pushed a commit to ruby/ruby that referenced this pull request Feb 18, 2024
(ruby/irb#877)

* Make help command display help for individual commands

Usage: `help [command]`

If the command is not specified, it will display a list of all available commands.

If the command is specified, it will display the banner OR description of the command.

If the command is not found, it will display a message saying that the command is not found.

* Rename test/irb/cmd to test/irb/command

* Add banner to edit and ls commands

* Promote help command in the help message

1. Make `show_cmds` an alias of `help` so it's not displayed in the help message
2. Update description of the help command to reflect `help <command>` syntax

* Rename banner to help_message

ruby/irb@43a2c99f3f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants