Class Pry::Command::Help
In: lib/pry/commands/help.rb
Parent: Pry::ClassCommand

Methods

Public Instance methods

Get a hash of available commands grouped by the "group" name.

Display help for an individual command.

@param [Pry::Command] command

Display help for a searched item, filtered by group

@param [String] search The string to search for.

Display help for a searched item, filtered first by group and if that fails, filtered by command name.

@param [String] search The string to search for.

Display the index view, with headings and short descriptions per command.

@param [Hash<String, Array<Commands>>] groups

Display help for an individual command or group.

@param [String] search The string to search for.

Given a group name and an array of commands, return the help string for those commands.

@param [String] name The group name. @param [Array<Pry::Command>] commands @return [String] The generated help string.

Clean search terms to make it easier to search group names

@param [String] key @return [String]

Find a subset of a hash that matches the user‘s search term.

If there‘s an exact match a Hash of one element will be returned, otherwise a sub-Hash with every key that matches the search will be returned.

@param [String] search the search term @param [Hash] hash the hash to search

Sort an array of commands by their `listing` name.

@param [Array<Pry::Command>] commands The commands to sort @return [Array<Pry::Command>] commands sorted by listing name.

@param [Hash] groups @return [Array<String>] An array of sorted group names.

We only want to show commands that have descriptions, so that the easter eggs don‘t show up.

[Validate]