Ruby irb: Difference between revisions
From wikinotes
(→Usage) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
| IRB_USE_AUTOCOMPLETE=false || disable irb autocomplete | | IRB_USE_AUTOCOMPLETE=false || disable irb autocomplete | ||
|} | |} | ||
</blockquote><!-- usage --> | |||
= Configuration = | |||
<blockquote> | |||
<source lang="ruby"> | |||
# ~/.irbrc | |||
IRB.conf[:USE_SINGLELINE] = true # use 'readline' instead of multiline support | |||
</source> | |||
</blockquote><!-- usage --> | </blockquote><!-- usage --> | ||
Line 19: | Line 29: | ||
<source lang="bash"> | <source lang="bash"> | ||
irb | irb | ||
irb --readline # uses readline, but disables multiline editing | |||
IRB.conf # show current config | IRB.conf # show current config | ||
</source> | </source> | ||
</blockquote><!-- usage --> | </blockquote><!-- usage --> |
Latest revision as of 22:02, 17 May 2023
An interactive ruby interpreter (installed separately from ruby itself).
Install
sudo pacman -S ruby-irb
Environment
IRB_USE_AUTOCOMPLETE=false disable irb autocomplete
Configuration
# ~/.irbrc IRB.conf[:USE_SINGLELINE] = true # use 'readline' instead of multiline support
Usage
irb irb --readline # uses readline, but disables multiline editing IRB.conf # show current config