|
| 1 | +## Indexes |
| 2 | + |
| 3 | +### Index of Command-Line Options |
| 4 | + |
| 5 | +These are the \IRB command-line options, with links to explanatory text: |
| 6 | + |
| 7 | +- `-d`: Set `$DEBUG` and {$VERBOSE}[rdoc-ref:IRB@Verbosity] |
| 8 | + to `true`. |
| 9 | +- `-E _ex_[:_in_]`: Set initial external (ex) and internal (in) |
| 10 | + {encodings}[rdoc-ref:IRB@Encodings] (same as `ruby -E>`). |
| 11 | +- `-f`: Don't initialize from {configuration file}[rdoc-ref:IRB@Configuration+File]. |
| 12 | +- `-I _dirpath_`: Specify {$LOAD_PATH directory}[rdoc-ref:IRB@Load+Modules] |
| 13 | + (same as `ruby -I`). |
| 14 | +- `-r _load-module_`: Require {load-module}[rdoc-ref:IRB@Load+Modules] |
| 15 | + (same as `ruby -r`). |
| 16 | +- `-U`: Set external and internal {encodings}[rdoc-ref:IRB@Encodings] to UTF-8. |
| 17 | +- `-w`: Suppress {warnings}[rdoc-ref:IRB@Warnings] (same as `ruby -w`). |
| 18 | +- `-W[_level_]`: Set {warning level}[rdoc-ref:IRB@Warnings]; |
| 19 | + 0=silence, 1=medium, 2=verbose (same as `ruby -W`). |
| 20 | +- `--autocomplete`: Use {auto-completion}[rdoc-ref:IRB@Automatic+Completion]. |
| 21 | +- `--back-trace-limit _n_`: Set a {backtrace limit}[rdoc-ref:IRB@Tracer]; |
| 22 | + display at most the top `n` and bottom `n` entries. |
| 23 | +- `--colorize`: Use {color-highlighting}[rdoc-ref:IRB@Color+Highlighting] |
| 24 | + for input and output. |
| 25 | +- `--context-mode _n_`: Select method to create Binding object |
| 26 | + for new {workspace}[rdoc-ref:IRB@Commands]; `n` in range `0..4`. |
| 27 | +- `--echo`: Print ({echo}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 28 | + return values. |
| 29 | +- `--extra-doc-dir _dirpath_`: |
| 30 | + Add a {documentation directory}[rdoc-ref:IRB@RI+Documentation+Directories] |
| 31 | + for the documentation dialog. |
| 32 | +- `--inf-ruby-mode`: Set prompt mode to {:INF_RUBY}[rdoc-ref:IRB@Pre-Defined+Prompts] |
| 33 | + (appropriate for `inf-ruby-mode` on Emacs); |
| 34 | + suppresses --multiline and --singleline. |
| 35 | +- `--inspect`: Use method `inspect` for printing ({echoing}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 36 | + return values. |
| 37 | +- `--multiline`: Use the multiline editor as the {input method}[rdoc-ref:IRB@Input+Method]. |
| 38 | +- `--noautocomplete`: Don't use {auto-completion}[rdoc-ref:IRB@Automatic+Completion]. |
| 39 | +- `--nocolorize`: Don't use {color-highlighting}[rdoc-ref:IRB@Color+Highlighting] |
| 40 | + for input and output. |
| 41 | +- `--noecho`: Don't print ({echo}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 42 | + return values. |
| 43 | +- `--noecho-on-assignment`: Don't print ({echo}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 44 | + result on assignment. |
| 45 | +- `--noinspect`: Don't se method `inspect` for printing ({echoing}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 46 | + return values. |
| 47 | +- `--nomultiline`: Don't use the multiline editor as the {input method}[rdoc-ref:IRB@Input+Method]. |
| 48 | +- `--noprompt`: Don't print {prompts}[rdoc-ref:IRB@Prompt+and+Return+Formats]. |
| 49 | +- `--noscript`: Treat the first command-line argument as a normal |
| 50 | + {command-line argument}[rdoc-ref:IRB@Initialization+Script], |
| 51 | + and include it in `ARGV`. |
| 52 | +- `--nosingleline`: Don't use the singleline editor as the {input method}[rdoc-ref:IRB@Input+Method]. |
| 53 | +- `--noverbose`Don't print {verbose}[rdoc-ref:IRB@Verbosity] details. |
| 54 | +- `--prompt _mode_`, `--prompt-mode _mode_`: |
| 55 | + Set {prompt and return formats}[rdoc-ref:IRB@Prompt+and+Return+Formats]; |
| 56 | + `mode` may be a {pre-defined prompt}[rdoc-ref:IRB@Pre-Defined+Prompts] |
| 57 | + or the name of a {custom prompt}[rdoc-ref:IRB@Custom+Prompts]. |
| 58 | +- `--script`: Treat the first command-line argument as the path to an |
| 59 | + {initialization script}[rdoc-ref:IRB@Initialization+Script], |
| 60 | + and omit it from `ARGV`. |
| 61 | +- `--simple-prompt`, `--sample-book-mode`: |
| 62 | + Set prompt mode to {:SIMPLE}[rdoc-ref:IRB@Pre-Defined+Prompts]. |
| 63 | +- `--singleline`: Use the singleline editor as the {input method}[rdoc-ref:IRB@Input+Method]. |
| 64 | +- `--tracer`: Use {Tracer}[rdoc-ref:IRB@Tracer] to print a stack trace for each input command. |
| 65 | +- `--truncate-echo-on-assignment`: Print ({echo}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 66 | + truncated result on assignment. |
| 67 | +- `--verbose`Print {verbose}[rdoc-ref:IRB@Verbosity] details. |
| 68 | +- `-v`, `--version`: Print the {IRB version}[rdoc-ref:IRB@Version]. |
| 69 | +- `-h`, `--help`: Print the {IRB help text}[rdoc-ref:IRB@Help]. |
| 70 | +- `--`: Separate options from {arguments}[rdoc-ref:IRB@Command-Line+Arguments] |
| 71 | + on the command-line. |
| 72 | + |
| 73 | +### Index of \IRB.conf Entries |
| 74 | + |
| 75 | +These are the keys for hash \IRB.conf entries, with links to explanatory text; |
| 76 | +for each entry that is pre-defined, the initial value is given: |
| 77 | + |
| 78 | +- `:AP_NAME`: \IRB {application name}[rdoc-ref:IRB@Application+Name]; |
| 79 | + initial value: `'irb'`. |
| 80 | +- `:AT_EXIT`: Array of hooks to call |
| 81 | + {at exit}[rdoc-ref:IRB@IRB]; |
| 82 | + initial value: `[]`. |
| 83 | +- `:AUTO_INDENT`: Whether {automatic indentation}[rdoc-ref:IRB@Automatic+Indentation] |
| 84 | + is enabled; initial value: `true`. |
| 85 | +- `:BACK_TRACE_LIMIT`: Sets the {back trace limit}[rdoc-ref:IRB@Tracer]; |
| 86 | + initial value: `16`. |
| 87 | +- `:COMMAND_ALIASES`: Defines input {command aliases}[rdoc-ref:IRB@Command+Aliases]; |
| 88 | + initial value: |
| 89 | + |
| 90 | + { |
| 91 | + "$": :show_source, |
| 92 | + "@": :whereami, |
| 93 | + } |
| 94 | + |
| 95 | +- `:CONTEXT_MODE`: Sets the {context mode}[rdoc-ref:IRB@Context+Mode], |
| 96 | + the type of binding to be used when evaluating statements; |
| 97 | + initial value: `4`. |
| 98 | +- `:ECHO`: Whether to print ({echo}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 99 | + return values; |
| 100 | + initial value: `nil`, which would set `conf.echo` to `true`. |
| 101 | +- `:ECHO_ON_ASSIGNMENT`: Whether to print ({echo}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) |
| 102 | + return values on assignment; |
| 103 | + initial value: `nil`, which would set `conf.echo_on_assignment` to `:truncate`. |
| 104 | +- `:EVAL_HISTORY`: How much {evaluation history}[rdoc-ref:IRB@Evaluation+History] |
| 105 | + is to be stored; initial value: `nil`. |
| 106 | +- `:EXTRA_DOC_DIRS`: \Array of |
| 107 | + {RI documentation directories}[rdoc-ref:IRB@RI+Documentation+Directories] |
| 108 | + to be parsed for the documentation dialog; |
| 109 | + initial value: `[]`. |
| 110 | +- `:IGNORE_EOF`: Whether to ignore {end-of-file}[rdoc-ref:IRB@End-of-File]; |
| 111 | + initial value: `false`. |
| 112 | +- `:IGNORE_SIGINT`: Whether to ignore {SIGINT}[rdoc-ref:IRB@SIGINT]; |
| 113 | + initial value: `true`. |
| 114 | +- `:INSPECT_MODE`: Whether to use method `inspect` for printing |
| 115 | + ({echoing}[rdoc-ref:IRB@Return-Value+Printing+-28Echoing-29]) return values; |
| 116 | + initial value: `true`. |
| 117 | +- `:IRB_LIB_PATH`: The path to the {IRB library directory}[rdoc-ref:IRB@IRB+Library+Directory]; initial value: |
| 118 | + |
| 119 | + - `"<i>RUBY_DIR</i>/lib/ruby/gems/<i>RUBY_VER_NUM</i>/gems/irb-<i>IRB_VER_NUM</i>/lib/irb"`, |
| 120 | + |
| 121 | + where: |
| 122 | + |
| 123 | + - <i>RUBY_DIR</i> is the Ruby installation dirpath. |
| 124 | + - <i>RUBY_VER_NUM</i> is the Ruby version number. |
| 125 | + - <i>IRB_VER_NUM</i> is the \IRB version number. |
| 126 | + |
| 127 | +- `:IRB_NAME`: {IRB name}[rdoc-ref:IRB@IRB+Name]; |
| 128 | + initial value: `'irb'`. |
| 129 | +- `:IRB_RC`: {Configuration monitor}[rdoc-ref:IRB@Configuration+Monitor]; |
| 130 | + initial value: `nil`. |
| 131 | +- `:LC_MESSAGES`: {Locale}[rdoc-ref:IRB@Locale]; |
| 132 | + initial value: IRB::Locale object. |
| 133 | +- `:LOAD_MODULES`: deprecated. |
| 134 | +- `:MAIN_CONTEXT`: The {context}[rdoc-ref:IRB@Session+Context] for the main \IRB session; |
| 135 | + initial value: IRB::Context object. |
| 136 | +- `:MEASURE`: Whether to |
| 137 | + {measure performance}[rdoc-ref:IRB@Performance+Measurement]; |
| 138 | + initial value: `false`. |
| 139 | +- `:MEASURE_CALLBACKS`: Callback methods for |
| 140 | + {performance measurement}[rdoc-ref:IRB@Performance+Measurement]; |
| 141 | + initial value: `[]`. |
| 142 | +- `:MEASURE_PROC`: Procs for |
| 143 | + {performance measurement}[rdoc-ref:IRB@Performance+Measurement]; |
| 144 | + initial value: |
| 145 | + |
| 146 | + { |
| 147 | + :TIME=>#<Proc:0x0000556e271c6598 /var/lib/gems/3.0.0/gems/irb-1.8.3/lib/irb/init.rb:106>, |
| 148 | + :STACKPROF=>#<Proc:0x0000556e271c6548 /var/lib/gems/3.0.0/gems/irb-1.8.3/lib/irb/init.rb:116> |
| 149 | + } |
| 150 | + |
| 151 | +- `:PROMPT`: \Hash of {defined prompts}[rdoc-ref:IRB@Prompt+and+Return+Formats]; |
| 152 | + initial value: |
| 153 | + |
| 154 | + { |
| 155 | + :NULL=>{:PROMPT_I=>nil, :PROMPT_S=>nil, :PROMPT_C=>nil, :RETURN=>"%s\n"}, |
| 156 | + :DEFAULT=>{:PROMPT_I=>"%N(%m):%03n> ", :PROMPT_S=>"%N(%m):%03n%l ", :PROMPT_C=>"%N(%m):%03n* ", :RETURN=>"=> %s\n"}, |
| 157 | + :CLASSIC=>{:PROMPT_I=>"%N(%m):%03n:%i> ", :PROMPT_S=>"%N(%m):%03n:%i%l ", :PROMPT_C=>"%N(%m):%03n:%i* ", :RETURN=>"%s\n"}, |
| 158 | + :SIMPLE=>{:PROMPT_I=>">> ", :PROMPT_S=>"%l> ", :PROMPT_C=>"?> ", :RETURN=>"=> %s\n"}, |
| 159 | + :INF_RUBY=>{:PROMPT_I=>"%N(%m):%03n> ", :PROMPT_S=>nil, :PROMPT_C=>nil, :RETURN=>"%s\n", :AUTO_INDENT=>true}, |
| 160 | + :XMP=>{:PROMPT_I=>nil, :PROMPT_S=>nil, :PROMPT_C=>nil, :RETURN=>" ==>%s\n"} |
| 161 | + } |
| 162 | + |
| 163 | +- `:PROMPT_MODE`: Name of {current prompt}[rdoc-ref:IRB@Prompt+and+Return+Formats]; |
| 164 | + initial value: `:DEFAULT`. |
| 165 | +- `:RC`: Whether a {configuration file}[rdoc-ref:IRB@Configuration+File] |
| 166 | + was found and interpreted; |
| 167 | + initial value: `true` if a configuration file was found, `false` otherwise. |
| 168 | +- `:RC_NAME_GENERATOR`: \Proc to generate paths of potential |
| 169 | + {configuration files}[rdoc-ref:IRB@Configuration+File]; |
| 170 | + initial value: `=> #<Proc:0x000055f9bebfed80 /var/lib/gems/3.0.0/gems/irb-1.8.3/lib/irb/init.rb:401>`. |
| 171 | +- `:SAVE_HISTORY`: Number of commands to save in |
| 172 | + {input command history}[rdoc-ref:IRB@Input+Command+History]; |
| 173 | + initial value: `1000`. |
| 174 | +- `:SINGLE_IRB`: Whether command-line option `--single-irb` was given; |
| 175 | + initial value: `true` if the option was given, `false` otherwise. |
| 176 | + See {Single-IRB Mode}[rdoc-ref:IRB@Single-IRB+Mode]. |
| 177 | +- `:USE_AUTOCOMPLETE`: Whether to use |
| 178 | + {automatic completion}[rdoc-ref:IRB@Automatic+Completion]; |
| 179 | + initial value: `true`. |
| 180 | +- `:USE_COLORIZE`: Whether to use |
| 181 | + {color highlighting}[rdoc-ref:IRB@Color+Highlighting]; |
| 182 | + initial value: `true`. |
| 183 | +- `:USE_LOADER`: Whether to use the |
| 184 | + {IRB loader}[rdoc-ref:IRB@IRB+Loader] for `require` and `load`; |
| 185 | + initial value: `false`. |
| 186 | +- `:USE_TRACER`: Whether to use the |
| 187 | + {IRB tracer}[rdoc-ref:IRB@Tracer]; |
| 188 | + initial value: `false`. |
| 189 | +- `:VERBOSE`: Whether to print {verbose output}[rdoc-ref:IRB@Verbosity]; |
| 190 | + initial value: `nil`. |
| 191 | +- `:__MAIN__`: The main \IRB object; |
| 192 | + initial value: `main`. |
0 commit comments