Usage: irb.rb [options] [programfile] [arguments]
-f Don't initialize from configuration file.
-d Set $DEBUG and $VERBOSE to true (same as 'ruby -d').
-r load-module Require load-module (same as 'ruby -r').
-I path Specify $LOAD_PATH directory (same as 'ruby -I').
-U Set external and internal encodings to UTF-8.
-E ex[:in] Set default external (ex) and internal (in) encodings
(same as 'ruby -E').
-w Suppress warnings (same as 'ruby -w').
-W[level=2] Set warning level: 0=silence, 1=medium, 2=verbose
(same as 'ruby -W').
--context-mode n Set n[0-4] to method to create Binding Object,
when new workspace was created.
--extra-doc-dir Add an extra doc dir for the doc dialog.
--echo Show result (default).
--noecho Don't show result.
--echo-on-assignment
Show result on assignment.
--noecho-on-assignment
Don't show result on assignment.
--truncate-echo-on-assignment
Show truncated result on assignment (default).
--inspect Use 'inspect' for output.
--noinspect Don't use 'inspect' for output.
--multiline Use multiline editor module.
--nomultiline Don't use multiline editor module (default).
--singleline Use single line editor module.
--nosingleline Don't use single line editor module (default).
--colorize Use color-highlighting (default).
--nocolorize Don't use color-highlighting.
--autocomplete Use auto-completion (default).
--noautocomplete Don't use auto-completion.
--prompt prompt-mode, --prompt-mode prompt-mode
Set prompt mode. Pre-defined prompt modes are:
'default', 'classic', 'simple', 'inf-ruby', 'xmp', 'null'.
--inf-ruby-mode Use prompt appropriate for inf-ruby-mode on emacs.
Suppresses --multiline and --singleline.
--sample-book-mode, --simple-prompt
Set prompt mode to 'simple'.
--noprompt Don't output prompt.
--script Script mode (default, treat first argument as script)
--noscript No script mode (leave arguments in argv)
--single-irb Share self with sub-irb.
--tracer Show stack trace for each command.
--back-trace-limit n[=16]
Display backtrace top n and bottom n.
--verbose Show details.
--noverbose Don't show details.
-v, --version Print the version of irb.
-h, --help Print help.
-- Separate options of irb from the list of command-line args.
Options (39)
| Option | Description | Source |
|---|---|---|
-f | Don't initialize from configuration file. | help + man |
-d | Set $DEBUG and $VERBOSE to true (same as 'ruby -d'). | help + man |
-r load-module | Require load-module (same as 'ruby -r'). | help + man |
-I path | Specify $LOAD_PATH directory (same as 'ruby -I'). | help + man |
-U | Set external and internal encodings to UTF-8. | help + man |
-E ex[:in | Set default external (ex) and internal (in) encodings (same as 'ruby -E'). | help |
-w | Suppress warnings (same as 'ruby -w'). | help + man |
-W level=2 | Set warning level: 0=silence, 1=medium, 2=verbose (same as 'ruby -W'). | help + man |
--context-mode n | Set n[0-4] to method to create Binding Object, when new workspace was created. | help |
--extra-doc-dir | Add an extra doc dir for the doc dialog. | help + man |
--echo | Show result (default). | help + man |
--noecho | Don't show result. | help + man |
--echo-on-assignment | Show result on assignment. | help + man |
--noecho-on-assignment | Don't show result on assignment. | help + man |
--truncate-echo-on-assignment | Show truncated result on assignment (default). | help + man |
--inspect | Uses inspect' for output (default except for bc mode) | help + man |
--noinspect | Don't use 'inspect' for output. | help + man |
--multiline | Uses multiline editor module. | help + man |
--nomultiline | Don't use multiline editor module (default). | help + man |
--singleline | Use single line editor module. | help + man |
--nosingleline | Don't use single line editor module (default). | help + man |
--colorize | Use color-highlighting (default). | help + man |
--nocolorize | Don't use color-highlighting. | help + man |
--autocomplete | Use auto-completion (default). | help + man |
--noautocomplete | Don't use auto-completion. | help + man |
--inf-ruby-mode | Uses prompt appropriate for inf-ruby-mode on emacs. | help + man |
--sample-book-mode, --simple-prompt | Set prompt mode to 'simple'. | help + man |
--noprompt | Don't output prompt. | help + man |
--script | Script mode (default, treat first argument as script) | help |
--noscript | No script mode (leave arguments in argv) | help |
--single-irb | Share self with sub-irb. | help |
--tracer | Displays trace for each execution of commands. | help + man |
--back-trace-limit n[=16 | Display backtrace top n and bottom n. | help + man |
--verbose | Show details. | help + man |
--noverbose | Don't show details. | help + man |
-v, --version | Print the version of irb. | help + man |
-h, --help | Prints a summary of the options. | help + man + man |
--prompt mode | (in the manual page but not in --help) | man |
--prompt-mode mode | Switch prompt mode. (in the manual page but not in --help) | man |
Examples (16) from the manual page, untested
% irbirb(main):001:0> 1 + 12irb(main):002:0> def t(x)irb(main):003:1> x + 1irb(main):004:1> end=> :tirb(main):005:0> t(3)=> 4irb(main):006:0> if t(3) == 4irb(main):007:1> p :okirb(main):008:1> end:ok=> :okirb(main):009:0> quit%