<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/default_commands.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/irb] Remove KEYWORD_ALIASES which handled special alias name</title>
<updated>2024-09-12T15:04:37+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-09-12T15:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a542479a750ff65c036df913a4b8d9dd350c4522'/>
<id>a542479a750ff65c036df913a4b8d9dd350c4522</id>
<content type='text'>
of irb_break irb_catch and irb_next command
(https://github.com/ruby/irb/pull/1004)

* Remove KEYWORD_ALIASES which handled special alias name of irb_break irb_catch and irb_next command

* Remove unused instance variable user_aliases

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

---------

https://github.com/ruby/irb/commit/f256d7899f

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of irb_break irb_catch and irb_next command
(https://github.com/ruby/irb/pull/1004)

* Remove KEYWORD_ALIASES which handled special alias name of irb_break irb_catch and irb_next command

* Remove unused instance variable user_aliases

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

---------

https://github.com/ruby/irb/commit/f256d7899f

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Group class methods under `class &lt;&lt; self`</title>
<updated>2024-07-16T15:58:15+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-07-16T15:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4a4e1bf357f5b5f568ead4da0537eb4506e20e5f'/>
<id>4a4e1bf357f5b5f568ead4da0537eb4506e20e5f</id>
<content type='text'>
(https://github.com/ruby/irb/pull/981)

https://github.com/ruby/irb/commit/cdaa356df2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/981)

https://github.com/ruby/irb/commit/cdaa356df2
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Introduce cd command</title>
<updated>2024-07-03T17:17:42+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-07-03T17:17:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7fe5f0a1d0e628e9e330169a5c2dedae0d40dedd'/>
<id>7fe5f0a1d0e628e9e330169a5c2dedae0d40dedd</id>
<content type='text'>
(https://github.com/ruby/irb/pull/971)

It's essentially a combination of pushws and popws commands that are
easier to use.

Help message:

```
Usage: cd ([target]|..)

IRB uses a stack of workspaces to keep track of context(s), with `pushws` and `popws` commands to manipulate the stack.
The `cd` command is an attempt to simplify the operation and will be subject to change.

When given:
- an object, cd will use that object as the new context by pushing it onto the workspace stack.
- "..", cd will leave the current context by popping the top workspace off the stack.
- no arguments, cd will move to the top workspace on the stack by popping off all workspaces.

Examples:

  cd Foo
  cd Foo.new
  cd @ivar
  cd ..
  cd
```

https://github.com/ruby/irb/commit/4a0e0e89b7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/971)

It's essentially a combination of pushws and popws commands that are
easier to use.

Help message:

```
Usage: cd ([target]|..)

IRB uses a stack of workspaces to keep track of context(s), with `pushws` and `popws` commands to manipulate the stack.
The `cd` command is an attempt to simplify the operation and will be subject to change.

When given:
- an object, cd will use that object as the new context by pushing it onto the workspace stack.
- "..", cd will leave the current context by popping the top workspace off the stack.
- no arguments, cd will move to the top workspace on the stack by popping off all workspaces.

Examples:

  cd Foo
  cd Foo.new
  cd @ivar
  cd ..
  cd
```

https://github.com/ruby/irb/commit/4a0e0e89b7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Add accidentally dropped disable_irb command back</title>
<updated>2024-06-05T16:29:29+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-06-05T16:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aa61d4237dad54e01c00f8cef4ba7f7cdffb8a80'/>
<id>aa61d4237dad54e01c00f8cef4ba7f7cdffb8a80</id>
<content type='text'>
(https://github.com/ruby/irb/pull/964)

* Add accidentally dropped disable_irb command back

* Sort command files require by name

https://github.com/ruby/irb/commit/1d627cebca
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/964)

* Add accidentally dropped disable_irb command back

* Sort command files require by name

https://github.com/ruby/irb/commit/1d627cebca
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Command registration should take both strings and symbols</title>
<updated>2024-04-26T12:12:31+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-04-26T12:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=25a8b76c763692083f6e850693b1319f1c544171'/>
<id>25a8b76c763692083f6e850693b1319f1c544171</id>
<content type='text'>
as names
(https://github.com/ruby/irb/pull/932)

This will save users some heads scratching when they try to register a
command with a string name and found that it doesn't work.

I also rewrote converted custom command tests into integration tests to
make test setup/cleanup easier.

https://github.com/ruby/irb/commit/a91a212dbe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as names
(https://github.com/ruby/irb/pull/932)

This will save users some heads scratching when they try to register a
command with a string name and found that it doesn't work.

I also rewrote converted custom command tests into integration tests to
make test setup/cleanup easier.

https://github.com/ruby/irb/commit/a91a212dbe
</pre>
</div>
</content>
</entry>
<entry>
<title>Sync IRB f9347b1 (#10611)</title>
<updated>2024-04-23T21:00:56+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2024-04-23T21:00:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e11237904cdee46409d0efb436b9b9326aaff355'/>
<id>e11237904cdee46409d0efb436b9b9326aaff355</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Stop using ExtendCommandBundle internally</title>
<updated>2024-04-20T18:55:54+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-04-20T18:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f16c6ac4fdbc619ba2f9d3dd7cd3b06c736aa589'/>
<id>f16c6ac4fdbc619ba2f9d3dd7cd3b06c736aa589</id>
<content type='text'>
(https://github.com/ruby/irb/pull/925)

This module was used to extend both commands and helpers when they're not
separated. Now that they are, and we have a Command module, we should move
command-related logic to the Command module and update related references.

This will make the code easier to understand and refactor in the future.

https://github.com/ruby/irb/commit/f74ec97236
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/925)

This module was used to extend both commands and helpers when they're not
separated. Now that they are, and we have a Command module, we should move
command-related logic to the Command module and update related references.

This will make the code easier to understand and refactor in the future.

https://github.com/ruby/irb/commit/f74ec97236
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Remove internal-only methods from Command::Base</title>
<updated>2024-04-17T18:36:30+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-04-17T18:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ca764062b06f1bb587048bcf374b25a0903ca9e7'/>
<id>ca764062b06f1bb587048bcf374b25a0903ca9e7</id>
<content type='text'>
(https://github.com/ruby/irb/pull/922)

* Remove internal-only methods from Command::Base

Command#ruby_args and Command#unwrap_string_literal are used for default command's argument backward compatibility.
Moved these methods to another module to avoid being used from custom commands.

* Update lib/irb/command/edit.rb

---------

https://github.com/ruby/irb/commit/7405a841e8

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/922)

* Remove internal-only methods from Command::Base

Command#ruby_args and Command#unwrap_string_literal are used for default command's argument backward compatibility.
Moved these methods to another module to avoid being used from custom commands.

* Update lib/irb/command/edit.rb

---------

https://github.com/ruby/irb/commit/7405a841e8

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Allow defining custom commands in IRB</title>
<updated>2024-04-14T11:01:43+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-04-14T11:01:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=04ba96e619325d6e2c053ae93c2514e9252f0497'/>
<id>04ba96e619325d6e2c053ae93c2514e9252f0497</id>
<content type='text'>
(https://github.com/ruby/irb/pull/886)

This is a feature that has been requested for a long time. It is now
possible to define custom commands in IRB.

Example usage:

```ruby
require "irb/command"

class HelloCommand &lt; IRB::Command::Base
  description "Prints hello world"
  category "My commands"
  help_message "It doesn't do more than printing hello world."

  def execute
    puts "Hello world"
  end
end

IRB::Command.register(:hello, HelloCommand)
```

https://github.com/ruby/irb/commit/888643467c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/886)

This is a feature that has been requested for a long time. It is now
possible to define custom commands in IRB.

Example usage:

```ruby
require "irb/command"

class HelloCommand &lt; IRB::Command::Base
  description "Prints hello world"
  category "My commands"
  help_message "It doesn't do more than printing hello world."

  def execute
    puts "Hello world"
  end
end

IRB::Command.register(:hello, HelloCommand)
```

https://github.com/ruby/irb/commit/888643467c
</pre>
</div>
</content>
</entry>
</feed>
