Last active
October 27, 2015 11:33
-
-
Save RafaelChefe/8888164ff1fcfa93603a to your computer and use it in GitHub Desktop.
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
# color and syntax reference: | |
# http://misc.flogisoft.com/bash/tip_colors_and_formatting | |
if defined?(Rails) | |
colors = HashWithIndifferentAccess.new({ | |
development: 32, # green | |
test: 33, # yellow | |
production: 31 # red | |
}) | |
env_name = Rails.env == "production" ? Rails.env.upcase : Rails.env | |
dir = File.basename(Dir.pwd) | |
Pry.config.prompt_name = "\e[#{colors[Rails.env]}m#{dir} #{env_name} \e[0m" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment