mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
migrating some commands from opts[:arg_string] to arg_string method
This commit is contained in:
parent
a074208e87
commit
3d14ef6368
1 changed files with 4 additions and 6 deletions
|
@ -20,7 +20,7 @@ class Pry
|
||||||
TOPLEVEL_BINDING.pry
|
TOPLEVEL_BINDING.pry
|
||||||
next
|
next
|
||||||
else
|
else
|
||||||
Pry.start target.eval(opts[:arg_string])
|
Pry.start target.eval(arg_string)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,16 +54,14 @@ class Pry
|
||||||
end
|
end
|
||||||
|
|
||||||
command "exit", "End the current Pry session. Accepts optional return value. Aliases: quit, back" do
|
command "exit", "End the current Pry session. Accepts optional return value. Aliases: quit, back" do
|
||||||
str = remove_first_word(opts[:val])
|
throw(:breakout, [opts[:nesting].level, target.eval(arg_string)])
|
||||||
throw(:breakout, [opts[:nesting].level, target.eval(str)])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
alias_command "quit", "exit", ""
|
alias_command "quit", "exit", ""
|
||||||
alias_command "back", "exit", ""
|
alias_command "back", "exit", ""
|
||||||
|
|
||||||
command "exit-all", "End all nested Pry sessions. Accepts optional return value. Aliases: !!@" do
|
command "exit-all", "End all nested Pry sessions. Accepts optional return value. Aliases: !!@" do
|
||||||
str = remove_first_word(opts[:val])
|
throw(:breakout, [0, target.eval(arg_string)])
|
||||||
throw(:breakout, [0, target.eval(str)])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
alias_command "!!@", "exit-all", ""
|
alias_command "!!@", "exit-all", ""
|
||||||
|
@ -76,7 +74,7 @@ class Pry
|
||||||
alias_command "!!!", "exit-program", ""
|
alias_command "!!!", "exit-program", ""
|
||||||
|
|
||||||
command "!pry", "Start a Pry session on current self; this even works mid-expression." do
|
command "!pry", "Start a Pry session on current self; this even works mid-expression." do
|
||||||
Pry.start(target)
|
target.pry
|
||||||
end
|
end
|
||||||
|
|
||||||
command "whereami", "Show the code context for the session. (whereami <n> shows <n> extra lines of code around the invocation line. Default: 5)" do |num|
|
command "whereami", "Show the code context for the session. (whereami <n> shows <n> extra lines of code around the invocation line. Default: 5)" do |num|
|
||||||
|
|
Loading…
Reference in a new issue