Skip to content

Commit

Permalink
Various copy changes
Browse files Browse the repository at this point in the history
Improves consistency of capitalization and punctuation across various
help text, plus some rewording and consolidating command groups.
  • Loading branch information
rf- committed May 5, 2014
1 parent cb2f8c0 commit 20cdc22
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 35 deletions.
14 changes: 7 additions & 7 deletions lib/pry/commands/change_inspector.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
class Pry::Command::ChangeInspector < Pry::ClassCommand
match 'change-inspector'
group 'inspect'
description 'change the current pry inspector'
group 'Input and Output'
description 'Change the current inspector proc.'
command_options argument_required: true
banner <<-BANNER
Usage: change-inspector
change the Proc to used to print return values in a repl session.
see list-inspectors for a list of available Proc's and a short description
of what they do.
Usage: change-inspector NAME
Change the proc used to print return values. See list-inspectors for a list
of available procs and a short description of what each one does.
BANNER

def process(inspector)
if inspector_map.key?(inspector)
_pry_.print = inspector_map[inspector][:value]
output.puts "switched to the '#{inspector}' inspector!"
output.puts "Switched to the '#{inspector}' inspector!"
else
raise Pry::CommandError, "'#{inspector}' isn't a known inspector!"
end
Expand Down
10 changes: 6 additions & 4 deletions lib/pry/commands/change_prompt.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
class Pry::Command::ChangePrompt < Pry::ClassCommand
match 'change-prompt'
group 'prompts'
description 'change the current pry prompt'
group 'Input and Output'
description 'Change the current prompt.'
command_options argument_required: true
banner <<-BANNER
Usage: change-prompt
change the current prompt. see list-prompts for a list of available prompts.
Usage: change-prompt NAME
Change the current prompt. See list-prompts for a list of available
prompts.
BANNER

def process(prompt)
Expand Down
2 changes: 1 addition & 1 deletion lib/pry/commands/gem_open.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Pry
class Command::GemOpen < Pry::ClassCommand
match 'gem-open'
group 'Gems'
description 'Opens the working directory of the gem in your editor'
description 'Opens the working directory of the gem in your editor.'
command_options :argument_required => true

banner <<-'BANNER'
Expand Down
8 changes: 4 additions & 4 deletions lib/pry/commands/help.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ class Pry
class Command::Help < Pry::ClassCommand
match 'help'
group 'Help'
description 'Show a list of commands or information about a specific command'
description 'Show a list of commands or information about a specific command.'

banner <<-'BANNER'
Usage: help [COMMAND]
With no arguments, help lists all the available commands in the current
command-set along with their description. When given a command name as an
argument, shows the help for that command.
With no arguments, help lists all the available commands along with their
descriptions. When given a command name as an argument, shows the help
for that command.
BANNER

# We only want to show commands that have descriptions, so that the
Expand Down
11 changes: 6 additions & 5 deletions lib/pry/commands/list_inspectors.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
class Pry::Command::ListInspectors < Pry::ClassCommand
match 'list-inspectors'
group 'inspect'
description 'list the inspector Procs available for use in pry'
group 'Input and Output'
description 'List the inspector procs available for use.'
banner <<-BANNER
Usage: list-inspectors
list the inspector Proc's available to print ruby objects(e.g: return values) in
a repl session.
List the inspector procs available to print return values. You can use
change-inspector to switch between them.
BANNER

def process
output.puts heading("Available inspectors") + "\n"
inspector_map.each do |name, inspector|
output.write "name: #{text.bold(name)}"
output.write "Name: #{text.bold(name)}"
output.puts selected_inspector?(inspector) ? selected_text : ""
output.puts inspector[:description]
output.puts
Expand Down
10 changes: 6 additions & 4 deletions lib/pry/commands/list_prompts.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
class Pry::Command::ListPrompts < Pry::ClassCommand
match 'list-prompts'
group 'prompts'
description 'list the prompts available for use in pry'
group 'Input and Output'
description 'List the prompts available for use.'
banner <<-BANNER
Usage: list-prompts
list the prompts available for use in pry
List the available prompts. You can use change-prompt to switch between
them.
BANNER

def process
output.puts heading("Available prompts") + "\n"
prompt_map.each do |name, prompt|
output.write "name: #{text.bold(name)}"
output.write "Name: #{text.bold(name)}"
output.puts selected_prompt?(prompt) ? selected_text : ""
output.puts prompt[:description]
output.puts
Expand Down
12 changes: 6 additions & 6 deletions lib/pry/inspector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ class Pry::Inspector
"default" => {
value: Pry::DEFAULT_PRINT,
description: <<-DESCRIPTION.each_line.map(&:lstrip!)
the default pry inspector. it has paging and color support, and uses pretty_inspect
when printing an object.
The default Pry inspector. It has paging and color support, and uses
pretty_inspect when printing an object.
DESCRIPTION
},

"simple" => {
value: Pry::SIMPLE_PRINT,
description: <<-DESCRIPTION.each_line.map(&:lstrip)
a simple inspector that uses #puts and #inspect when printing an object.
it has no pager, color, or pretty_inspect support.
A simple inspector that uses #puts and #inspect when printing an
object. It has no pager, color, or pretty_inspect support.
DESCRIPTION
},

"clipped" => {
value: Pry::CLIPPED_PRINT,
description: <<-DESCRIPTION.each_line.map(&:lstrip)
the clipped inspector has the same features as the 'simple' inspector but prints
large objects as a smaller string.
The clipped inspector has the same features as the 'simple' inspector
but prints large objects as a smaller string.
DESCRIPTION
}
}
Expand Down
11 changes: 7 additions & 4 deletions lib/pry/prompt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@ class Pry::Prompt
MAP = {
"default" => {
value: Pry::DEFAULT_PROMPT,
description: "the default pry prompt"
description: "The default Pry prompt. Includes information about the\n" \
"current expression number, evaluation context, and nesting\n" \
"level, plus a reminder that you're using Pry."
},

"simple" => {
value: Pry::SIMPLE_PROMPT,
description: "a simple prompt"
description: "A simple '>>'."
},

"nav" => {
value: Pry::NAV_PROMPT,
description: "a prompt that draws the binding stack as a path and includes information about _in_ and _out_"
description: "A prompt that displays the binding stack as a path and\n" \
"includes information about _in_ and _out_."
},

"none" => {
value: Pry::NO_PROMPT,
description: "wave goodbye to the pry prompt"
description: "Wave goodbye to the Pry prompt."
}
}
end

0 comments on commit 20cdc22

Please sign in to comment.