Ruby irb: Difference between revisions

From wikinotes
(Created page with "An interactive ruby interpreter (installed separately from ruby itself). = Install = <blockquote> <source lang="bash"> sudo pacman -S ruby-irb </source> </blockquote><!-- ins...")
 
 
(4 intermediate revisions by the same user not shown)
Line 7: Line 7:
</source>
</source>
</blockquote><!-- install -->
</blockquote><!-- install -->
= Environment =
<blockquote>
{|
| 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 -->


= Usage =
= Usage =
Line 12: Line 29:
<source lang="bash">
<source lang="bash">
irb
irb
irb --readline  # uses readline, but disables multiline editing
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