<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/command/edit.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 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>
<entry>
<title>[ruby/irb] Command implementation not by method</title>
<updated>2024-04-10T16:52:53+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-04-10T16:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6a505d1b59cf326a8e004fc06e02f30222b17f3f'/>
<id>6a505d1b59cf326a8e004fc06e02f30222b17f3f</id>
<content type='text'>
(https://github.com/ruby/irb/pull/824)

* Command is not a method

* Fix command test

* Implement non-method command name completion

* Add test for ExtendCommandBundle.def_extend_command

* Add helper method install test

* Remove spaces in command input parse

* Remove command arg unquote in help command

* Simplify Statement and handle execution in IRB::Irb

* Tweak require, const name

* Always install CommandBundle module to main object

* Remove considering local variable in command or expression check

* Remove unused method, tweak

* Remove outdated comment for help command arg

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

---------

https://github.com/ruby/irb/commit/8fb776e379

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/824)

* Command is not a method

* Fix command test

* Implement non-method command name completion

* Add test for ExtendCommandBundle.def_extend_command

* Add helper method install test

* Remove spaces in command input parse

* Remove command arg unquote in help command

* Simplify Statement and handle execution in IRB::Irb

* Tweak require, const name

* Always install CommandBundle module to main object

* Remove considering local variable in command or expression check

* Remove unused method, tweak

* Remove outdated comment for help command arg

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

---------

https://github.com/ruby/irb/commit/8fb776e379

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Revamp `help` command</title>
<updated>2024-02-18T18:21:08+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-18T18:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=07c774e85cf0a3352c045ec3ae83db1215962997'/>
<id>07c774e85cf0a3352c045ec3ae83db1215962997</id>
<content type='text'>
(https://github.com/ruby/irb/pull/877)

* Make help command display help for individual commands

Usage: `help [command]`

If the command is not specified, it will display a list of all available commands.

If the command is specified, it will display the banner OR description of the command.

If the command is not found, it will display a message saying that the command is not found.

* Rename test/irb/cmd to test/irb/command

* Add banner to edit and ls commands

* Promote help command in the help message

1. Make `show_cmds` an alias of `help` so it's not displayed in the help message
2. Update description of the help command to reflect `help &lt;command&gt;` syntax

* Rename banner to help_message

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

* Make help command display help for individual commands

Usage: `help [command]`

If the command is not specified, it will display a list of all available commands.

If the command is specified, it will display the banner OR description of the command.

If the command is not found, it will display a message saying that the command is not found.

* Rename test/irb/cmd to test/irb/command

* Add banner to edit and ls commands

* Promote help command in the help message

1. Make `show_cmds` an alias of `help` so it's not displayed in the help message
2. Update description of the help command to reflect `help &lt;command&gt;` syntax

* Rename banner to help_message

https://github.com/ruby/irb/commit/43a2c99f3f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Standardize command related names</title>
<updated>2024-02-16T16:47:36+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-16T16:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f5801e2bf404cbb0f673a6ebb040b0ba6cd01b77'/>
<id>f5801e2bf404cbb0f673a6ebb040b0ba6cd01b77</id>
<content type='text'>
(https://github.com/ruby/irb/pull/873)

* Replace ExtendCommand with Command and standardize command related names

1. Rename lib/irb/extend-command.rb to lib/irb/command.rb
2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb
3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb
4. Rename ExtendCommand to Command

* Alias ExtendCommand to Command and deprecate it

* Rename Command::Nop to Command::Base

* Not deprecate old constants just yet

* Add lib/irb/cmd/nop.rb back

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

* Replace ExtendCommand with Command and standardize command related names

1. Rename lib/irb/extend-command.rb to lib/irb/command.rb
2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb
3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb
4. Rename ExtendCommand to Command

* Alias ExtendCommand to Command and deprecate it

* Rename Command::Nop to Command::Base

* Not deprecate old constants just yet

* Add lib/irb/cmd/nop.rb back

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