summaryrefslogtreecommitdiff
path: root/lib/pry/commands/shell_mode.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pry/commands/shell_mode.rb')
-rw-r--r--lib/pry/commands/shell_mode.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/pry/commands/shell_mode.rb b/lib/pry/commands/shell_mode.rb
index 0e5fd0bd..429da7ad 100644
--- a/lib/pry/commands/shell_mode.rb
+++ b/lib/pry/commands/shell_mode.rb
@@ -9,13 +9,11 @@ class Pry
BANNER
def process
- case _pry_.prompt
- when Pry::Prompt::SHELL
- _pry_.pop_prompt
- _pry_.custom_completions = _pry_.config.file_completions
+ if state.disabled ^= true
+ state.prev_prompt = _pry_.prompt
+ _pry_.prompt = Pry::Prompt[:shell][:value]
else
- _pry_.push_prompt Pry::Prompt::SHELL
- _pry_.custom_completions = _pry_.config.command_completions
+ _pry_.prompt = state.prev_prompt
end
end
end