simple-prompt now uses prompt stack so it properly resets to prompt when returning from simple-prompt mode

This commit is contained in:
John Mair 2011-05-30 03:38:23 +12:00
parent 7bc03759d9
commit 6eba6f7a03
1 changed files with 2 additions and 2 deletions

View File

@ -10,9 +10,9 @@ class Pry
command "simple-prompt", "Toggle the simple prompt." do
case Pry.active_instance.prompt
when Pry::SIMPLE_PROMPT
Pry.active_instance.prompt = Pry::DEFAULT_PROMPT
Pry.active_instance.pop_prompt
else
Pry.active_instance.prompt = Pry::SIMPLE_PROMPT
Pry.active_instance.push_prompt Pry::SIMPLE_PROMPT
end
end