pry--pry/lib/pry/commands/simple_prompt.rb

19 lines
384 B
Ruby

class Pry
class Command::SimplePrompt < Pry::ClassCommand
match 'simple-prompt'
group 'Misc'
description 'Toggle the simple prompt.'
def process
case _pry_.prompt
when Pry::SIMPLE_PROMPT
_pry_.pop_prompt
else
_pry_.push_prompt Pry::SIMPLE_PROMPT
end
end
end
Pry::Commands.add_command(Pry::Command::SimplePrompt)
end