Created
March 6, 2009 19:20
-
-
Save choonkeat/75025 to your computer and use it in GitHub Desktop.
irbrc config to make irb or script/console output be copy-paste friendly
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
# Append this content into ~/.irbrc | |
# | |
# irb console prompt to make the output copy-paste friendly | |
# overrides :simple for use in Rails' script/console | |
# overrides :default for use in regular irb session | |
IRB.conf[:PROMPT][:SIMPLE] = IRB.conf[:PROMPT][:DEFAULT] = { | |
:PROMPT_I => "\"%N(%m):%03n:%i>\"; ", # normal prompt: an inconsequential statement, a string | |
:PROMPT_S => "", # prompt for continuing strings: nothing | |
:PROMPT_C => "", # prompt for continuing statement: nothing | |
:RETURN => "#=> %s\n" # return value output is commented to not disrupt the code flow | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment