2012-08-11 20:22:29 -04:00
|
|
|
class Pry
|
2012-12-25 16:35:17 -05:00
|
|
|
class Command::SimplePrompt < Pry::ClassCommand
|
|
|
|
match 'simple-prompt'
|
2014-03-23 08:14:15 -04:00
|
|
|
group 'prompts'
|
2012-12-25 16:35:17 -05:00
|
|
|
description 'Toggle the simple prompt.'
|
2012-08-11 21:26:59 -04:00
|
|
|
|
2013-01-09 15:23:19 -05:00
|
|
|
banner <<-'BANNER'
|
|
|
|
Toggle the simple prompt.
|
|
|
|
BANNER
|
|
|
|
|
2012-08-11 21:26:59 -04:00
|
|
|
def process
|
|
|
|
case _pry_.prompt
|
|
|
|
when Pry::SIMPLE_PROMPT
|
|
|
|
_pry_.pop_prompt
|
|
|
|
else
|
|
|
|
_pry_.push_prompt Pry::SIMPLE_PROMPT
|
|
|
|
end
|
2012-08-11 20:22:29 -04:00
|
|
|
end
|
|
|
|
end
|
2012-12-25 16:35:17 -05:00
|
|
|
|
|
|
|
Pry::Commands.add_command(Pry::Command::SimplePrompt)
|
2012-08-11 20:22:29 -04:00
|
|
|
end
|