Skip to content

Instantly share code, notes, and snippets.

@ConradIrwin
Created November 15, 2013 21:37
Show Gist options
  • Save ConradIrwin/7492064 to your computer and use it in GitHub Desktop.
Save ConradIrwin/7492064 to your computer and use it in GitHub Desktop.
# Show red environment name in pry prompt for non development environments
old_prompt = Pry.config.prompt
Pry.config.prompt = [
proc {|a,b,c| "\001\e[31m\002#{(Rails.env.upcase)}\001\e[0m\002 #{old_prompt.first.call(a,b,c)}"},
proc {|a,b,c| "\001\e[31m\002#{(Rails.env.upcase)}\001\e[0m\002 #{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