From 5958c305e527460465bdbd43e59b2da26d4cfbfb Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 19 Nov 2022 14:14:40 -0800 Subject: [ruby/irb] Document a full list of commands (https://github.com/ruby/irb/pull/451) * Document a full list of commands * Document debug as well * Make it less duplicated --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 35ef2d9e89..5b1f21abc9 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,50 @@ see [Building Ruby](doc/contributing/building_ruby.md) https://www.ruby-lang.org/ +## Commands + +The following commands are available on IRB. + +* `cwws` + * Show the current workspace. +* `cb`, `cws`, `chws` + * Change the current workspace to an object. +* `bindings`, `workspaces` + * Show workspaces. +* `pushb`, `pushws` + * Push an object to the workspace stack. +* `popb`, `popws` + * Pop a workspace from the workspace stack. +* `load` + * Load a Ruby file. +* `require` + * Require a Ruby file. +* `source` + * Loads a given file in the current session. +* `irb` + * Start a child IRB. +* `jobs` + * List of current sessions. +* `fg` + * Switches to the session of the given number. +* `kill` + * Kills the session with the given number. +* `help` + * Enter the mode to look up RI documents. +* `irb_info` + * Show information about IRB. +* `ls` + * Show methods, constants, and variables. + `-g [query]` or `-G [query]` allows you to filter out the output. +* `measure` + * `measure` enables the mode to measure processing time. `measure :off` disables it. +* `$`, `show_source` + * Show the source code of a given method or constant. +* `@`, `whereami` + * Show the source code around binding.irb again. +* `debug` + * Start the debugger of debug.gem. + ## Documentation - [English](https://docs.ruby-lang.org/en/master/index.html) -- cgit v1.2.1