2012-08-12 00:22:29 +00:00
|
|
|
class Pry
|
2012-12-25 21:35:17 +00:00
|
|
|
class Command::SimplePrompt < Pry::ClassCommand
|
|
|
|
match 'simple-prompt'
|
2012-08-12 01:26:59 +00:00
|
|
|
group 'Misc'
|
2012-12-25 21:35:17 +00:00
|
|
|
description 'Toggle the simple prompt.'
|
2012-08-12 01:26:59 +00:00
|
|
|
|
|
|
|
def process
|
|
|
|
case _pry_.prompt
|
|
|
|
when Pry::SIMPLE_PROMPT
|
|
|
|
_pry_.pop_prompt
|
|
|
|
else
|
|
|
|
_pry_.push_prompt Pry::SIMPLE_PROMPT
|
|
|
|
end
|
2012-08-12 00:22:29 +00:00
|
|
|
end
|
|
|
|
end
|
2012-12-25 21:35:17 +00:00
|
|
|
|
|
|
|
Pry::Commands.add_command(Pry::Command::SimplePrompt)
|
2012-08-12 00:22:29 +00:00
|
|
|
end
|