diff options
author | 0xAB <0xAB@protonmail.com> | 2017-09-01 19:59:24 +0100 |
---|---|---|
committer | 0xAB <0xAB@protonmail.com> | 2017-09-01 19:59:24 +0100 |
commit | a4e5830bff460e227db8605966bced2094093868 (patch) | |
tree | d7fe528516247e45172e3e864f7b2fd5b3bc127d | |
parent | 02d3921306aebd50f8d9e32c15386c6054bff29f (diff) | |
download | pry-a4e5830bff460e227db8605966bced2094093868.tar.gz |
group *-prompt commands under 'Prompts' in output of 'help' command.
-rw-r--r-- | lib/pry/commands/alias_prompt.rb | 8 | ||||
-rw-r--r-- | lib/pry/commands/change_prompt.rb | 2 | ||||
-rw-r--r-- | lib/pry/commands/list_prompts.rb | 4 | ||||
-rw-r--r-- | lib/pry/commands/simple_prompt.rb | 11 |
4 files changed, 12 insertions, 13 deletions
diff --git a/lib/pry/commands/alias_prompt.rb b/lib/pry/commands/alias_prompt.rb index a5f7a5ab..f1213641 100644 --- a/lib/pry/commands/alias_prompt.rb +++ b/lib/pry/commands/alias_prompt.rb @@ -1,13 +1,13 @@ class Pry class Command::AliasPrompt < Pry::ClassCommand match "alias-prompt" - group 'Input and Output' - description "Create an alternative alias for a prompt" + group 'Prompts' + description "Create an alias for a prompt visible in 'list-prompts'." banner <<-BANNER alias-prompt PROMPT_NAME ALIAS_PROMPT - Create an alternative alias for a prompt that can be seen from list-prompts and - used by the change-prompt commands. + Create an alias for a prompt. See list-prompts for a complete list of available + prompts. BANNER command_options argument_required: true diff --git a/lib/pry/commands/change_prompt.rb b/lib/pry/commands/change_prompt.rb index 859825a2..359a8ed3 100644 --- a/lib/pry/commands/change_prompt.rb +++ b/lib/pry/commands/change_prompt.rb @@ -1,6 +1,6 @@ class Pry::Command::ChangePrompt < Pry::ClassCommand match 'change-prompt' - group 'Input and Output' + group 'Prompts' description 'Change the current prompt.' command_options argument_required: true banner <<-BANNER diff --git a/lib/pry/commands/list_prompts.rb b/lib/pry/commands/list_prompts.rb index b8c2b29b..317dc7aa 100644 --- a/lib/pry/commands/list_prompts.rb +++ b/lib/pry/commands/list_prompts.rb @@ -1,7 +1,7 @@ class Pry::Command::ListPrompts < Pry::ClassCommand match 'list-prompts' - group 'Input and Output' - description 'List the prompts available for use.' + group 'Prompts' + description 'List all prompts that are available to use.' banner <<-BANNER Usage: list-prompts diff --git a/lib/pry/commands/simple_prompt.rb b/lib/pry/commands/simple_prompt.rb index 4d1e6eca..eff12442 100644 --- a/lib/pry/commands/simple_prompt.rb +++ b/lib/pry/commands/simple_prompt.rb @@ -1,22 +1,21 @@ class Pry class Command::SimplePrompt < Pry::ClassCommand match 'simple-prompt' - group 'prompts' + group 'Prompts' description 'Toggle the simple prompt.' banner <<-'BANNER' - Toggle the simple prompt. + Toggle between current prompt and the 'simple' prompt. BANNER def process case _pry_.prompt - when Pry::SIMPLE_PROMPT + when Pry::Prompt['simple'] _pry_.pop_prompt else - _pry_.push_prompt Pry::SIMPLE_PROMPT + _pry_.push_prompt Pry::Prompt['simple'] end end + Pry::Commands.add_command(self) end - - Pry::Commands.add_command(Pry::Command::SimplePrompt) end |