Skip to content

Instantly share code, notes, and snippets.

@janetriley
Created January 17, 2014 03:17
Show Gist options
  • Save janetriley/8467828 to your computer and use it in GitHub Desktop.
Save janetriley/8467828 to your computer and use it in GitHub Desktop.
Visual tweak to make IRB prompt visually different from plain command line. Make irb prompt red; add completion.
require 'irb/completion'
# Make prompt red: use ANSI color code \033[0;31m
IRB.conf[:PROMPT][:RAILSBRIDGE] = {
:PROMPT_I => "\033[0;31m%N:line %03n >",
:PROMPT_S => "%N:line %03n:%l \033[0;31m ",
:PROMPT_C => "%N:line %03n:* \033[0;31m ",
:RETURN => "%s\n"
}
IRB.conf[:PROMPT_MODE] = :RAILSBRIDGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment