Created
June 26, 2020 02:57
-
-
Save glasses618/1b170156d0cc65ecfb1cab4b8ef879d2 to your computer and use it in GitHub Desktop.
pry prompt after v0.13.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless Rails.env.development? | |
default_prompt = Pry::Prompt[:default] | |
env = Pry::Helpers::Text.red(Rails.env.upcase) | |
Pry.config.prompt = Pry::Prompt.new( | |
'custom', | |
'my custom prompt', | |
[ | |
proc{ |*args| "#{env} #{default_prompt.wait_proc.call(*args)}" }, | |
proc{ |*args| "#{env} #{default_prompt.incomplete_proc.call(*args)}" }, | |
], | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment