mrbgems/mruby-bin-mirb/README.md
mirb (mruby interactive) is an interactive Ruby shell for mruby.
mirb [options]
-v - print version and exit-d - set $DEBUG to true-r library - load the library before executing--verbose - verbose modemirb supports context-aware tab completion when built with a readline library.
Methods on objects: Type an expression followed by . and press Tab
> "hello".up<Tab>
upcase upcase! upto
Local variables: Variables defined in the session
> my_var = 123
> my<Tab>
my_var
Global variables: Press Tab after $
> $std<Tab>
$stdout $stderr $stdin
Constants and classes: Capital letter followed by Tab
> Str<Tab>
String Struct
Ruby keywords: At the start of expressions
> cla<Tab>
class
Tab completion works with:
The readline library can be configured via the MRUBY_MIRB_READLINE environment variable:
# Auto-detect (default)
rake
# Force specific library
MRUBY_MIRB_READLINE=readline rake # GNU readline
MRUBY_MIRB_READLINE=libedit rake # libedit
MRUBY_MIRB_READLINE=linenoise rake # linenoise
# Disable readline (plain input mode)
MRUBY_MIRB_READLINE=none rake
obj.method(). are not completed to avoid side effectsrequire/load statements is planned for future versionsMIT License - see the mruby LICENSE file.