Created
September 21, 2012 02:13
-
-
Save loopj/3759405 to your computer and use it in GitHub Desktop.
Show red environment name in pry prompt for non development environments
This file contains hidden or 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
| # Put this in an initializer | |
| old_prompt = Pry.config.prompt | |
| Pry.config.prompt = [ | |
| proc {|a,b,c| "\e[31m#{(Rails.env.upcase)}\e[0m #{old_prompt.first.call(a,b,c)}"}, | |
| proc {|a,b,c| "\e[31m#{(Rails.env.upcase)}\e[0m #{old_prompt.second.call(a,b,c)}"}, | |
| ] unless Rails.env.development? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment