-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow defining custom commands in IRB
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 < 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) ```
- Loading branch information
Showing
4 changed files
with
303 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
require 'shellwords' | ||
|
||
require_relative "../color" | ||
require_relative "../source_finder" | ||
|
||
module IRB | ||
|
Oops, something went wrong.