This post is related to this lighthouse ticket.
If you want to have some clue about the current RAILS_ENV (because you need some sleep, or like me you have several terminal instances, with severals rails consoles), just add this to your ~/.irbrc file :
# Prompts
IRB.conf[:PROMPT][:CUSTOM] = {
:PROMPT_N => "[#{ENV["RAILS_ENV"].capitalize}]>> ",
:PROMPT_I => "[#{ENV["RAILS_ENV"].capitalize}]>> ",
:PROMPT_S => nil,
:PROMPT_C => "?> ",
:RETURN => "=> %s\n"
}
# Set default prompt
IRB.conf[:PROMPT_MODE] = :CUSTOM
You will end with a console like mine :
[Development]>> 1+1
=> 2
Enjoy !
0 comments:
Post a Comment