I just updated my ruby version and now when I run irb in command line, I get this weird:
1.9.2p290 :001 >
every line. Before it was a simple >
How can I get it back again?
You can edit your ~/.irbrc
file to change the prompt (command line prefix). See this answer for an example. You could put this in there to start:
IRB.conf[:PROMPT][:CUSTOM] = {:PROMPT_I => ">> "}
IRB.conf[:PROMPT_MODE] = :CUSTOM
IRB.conf[:AUTO_INDENT] = true
.irbrc
is a Ruby script that irb runs when it starts up that lets you configure your prompt.
From this article, in your user dir ~/
, create the .irbrc
file with following:
IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode
:PROMPT_I => ">", # normal prompt
:PROMPT_S => nil, # prompt for continuated strings
:PROMPT_C => nil, # prompt for continuated statement
:RETURN => "=> %s\n" # format to return value
}
IRB.conf[:PROMPT_MODE] = :MY_PROMPT