diff options
author | Stan Lo <stan.lo@shopify.com> | 2022-11-20 04:47:51 +0000 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-11-20 04:47:54 +0000 |
commit | 180ed611b238db48db9feb1449c4e3b563d2dce0 (patch) | |
tree | bfd4d7be6b7c0d17773eeead6ea0f6c63186e342 /README.md | |
parent | 439990318d90a689b2ac067b41c3462ddda60ae5 (diff) |
[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.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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` |