aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorStan Lo <stan.lo@shopify.com>2022-11-20 04:47:51 +0000
committergit <svn-admin@ruby-lang.org>2022-11-20 04:47:54 +0000
commit180ed611b238db48db9feb1449c4e3b563d2dce0 (patch)
treebfd4d7be6b7c0d17773eeead6ea0f6c63186e342 /README.md
parent439990318d90a689b2ac067b41c3462ddda60ae5 (diff)
downloadruby-180ed611b238db48db9feb1449c4e3b563d2dce0.tar.gz
[ruby/irb] Add edit command (https://github.com/ruby/irb/pull/453)
* Add edit command * Make find_source a public singleton method * Add document for the edit command * Make find_end private * Remove duplicated private https://github.com/ruby/irb/commit/4321674aa7 Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5b1f21abc9..9b4249beb2 100644
--- a/README.md
+++ b/README.md
@@ -64,6 +64,13 @@ The following commands are available on IRB.
* Change the current workspace to an object.
* `bindings`, `workspaces`
* Show workspaces.
+* `edit`
+ * Open a file with the editor command defined with `ENV["EDITOR"]`
+ * `edit` - opens the file the current context belongs to (if applicable)
+ * `edit foo.rb` - opens `foo.rb`
+ * `edit Foo` - opens the location of `Foo`
+ * `edit Foo.bar` - opens the location of `Foo.bar`
+ * `edit Foo#bar` - opens the location of `Foo#bar`
* `pushb`, `pushws`
* Push an object to the workspace stack.
* `popb`, `popws`