Guest User

Untitled

a guest
May 26th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # Set the IRB prompt to be the end of the current directory
  2.  
  3. PWD = Dir.pwd.split("/").last
  4.  
  5. IRB.conf[:PROMPT][:MY_PROMPT] = {
  6.  
  7. :PROMPT_I => "#{PWD}> ",
  8.  
  9. :PROMPT_S => "#{PWD}%l ",
  10.  
  11. :PROMPT_C => "#{PWD}>> ",
  12.  
  13. :RETURN => "%s\n"
  14. }
  15.  
  16. IRB.conf[:PROMPT_MODE] = :MY_PROMPT
  17.  
  18. # Haven't tried it but rails people could also add the RAILS_ENV? Say which environment your console was in
Add Comment
Please, Sign In to add comment