Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12624
|
|
(https://github.com/ruby/irb/pull/1067)
https://github.com/ruby/irb/commit/6194111611
Notes:
Merged: https://github.com/ruby/ruby/pull/12612
|
|
launch
(https://github.com/ruby/irb/pull/1040)
* Quickly show inspect preview even if pretty_print takes too much time
* Show a message "Inspecting..." while generating pretty_print content
* Update inspecting message
Co-authored-by: Stan Lo <[email protected]>
* Update rendering test for preparing inspect message
* Don't show preview if pretty_print does not take time
---------
https://github.com/ruby/irb/commit/03c36586e6
Co-authored-by: Stan Lo <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/12612
|
|
Closes https://github.com/ruby/irb/pull/753
https://github.com/ruby/irb/commit/a24ac53d48
Notes:
Merged: https://github.com/ruby/ruby/pull/12612
|
|
(https://github.com/ruby/irb/pull/1057)
Local variable `grep` was always nil because the regular expression parsing options contained an unnecessary `\n`. `test_history_grep` did not detect this because it only asserted what was included in the output.
https://github.com/ruby/irb/commit/a282bbc0cf
|
|
components
(https://github.com/ruby/irb/pull/1047)
https://github.com/ruby/irb/commit/f57025a35e
|
|
(https://github.com/ruby/irb/pull/1039)
https://github.com/ruby/irb/commit/9eb14a3a0b
|
|
object
(https://github.com/ruby/irb/pull/1031)
IRB used delegator to install command as a method of frozen main object.
Command is not a method now. We can drop it.
https://github.com/ruby/irb/commit/2f1c593801
|
|
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 <[email protected]>
---------
https://github.com/ruby/irb/commit/f256d7899f
Co-authored-by: Stan Lo <[email protected]>
|
|
(https://github.com/ruby/irb/pull/981)
https://github.com/ruby/irb/commit/cdaa356df2
|
|
(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
|
|
(https://github.com/ruby/irb/pull/948)
* Remove unnecessary code from command tests
* Improve help message for no meta commands
1. Add placeholder values for both command category and description
2. Update help command's output to give different types of categories
more explicit ordering
https://github.com/ruby/irb/commit/b1ef58aeff
|
|
check
(https://github.com/ruby/irb/pull/947)
https://github.com/ruby/irb/commit/4a4d7a4279
|
|
commands
(https://github.com/ruby/irb/pull/944)
* Avoid raising errors while running help for custom commands
Raising an error from the help command is not a pleasure for the
end user, even if the command does not define any attributes
* Update test/irb/command/test_custom_command.rb
---------
https://github.com/ruby/irb/commit/c8bba9f8dc
Co-authored-by: Stan Lo <[email protected]>
|
|
(https://github.com/ruby/irb/pull/934)
Since commands can't be chained with methods, their return values are
not intended to be used. But if IRB keeps storing command return values
as the last value, and print them, users may rely on such implicit
behaviour.
So to avoid such confusion, this commit suppresses command's
return values. It also updates some commands that currently rely on
this implicit behaviour.
https://github.com/ruby/irb/commit/fa96bea76f
|
|
|
|
(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
|
|
debug_readline
(https://github.com/ruby/irb/pull/923)
* Remove exit and exti! command workaround when executed outside of IRB
Command was a method. It could be executed outside of IRB.
Workaround for it is no longer needed.
* Handle IRB_EXIT in debug mode
* Add exit and exit! command in rdbg mode
https://github.com/ruby/irb/commit/0b5dd6afd0
|
|
(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 <[email protected]>
|
|
(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 < 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
|
|
(https://github.com/ruby/irb/pull/918)
https://github.com/ruby/irb/commit/97898b6251
|
|
(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 <[email protected]>
---------
https://github.com/ruby/irb/commit/8fb776e379
Co-authored-by: Stan Lo <[email protected]>
|
|
(https://github.com/ruby/irb/pull/901)
* Always save irb_history in HOME or XDG_CONFIG_HOME
Also split irbrc search logic from irb_history search logic as a refactor
* Remove IRB.conf[:RC_NAME_GENERATOR] because it's not configurable
This conf is used to specify which irbrc to load. Need to configure before irbrc is loaded, so it's actually not configurable.
This conf is also used for history file search, but it is configurable by conf[:HISTORY_FILE].
* remove rc_file_test because it is tested with rc_files, remove useless test setup
* Make internal irbrc searching method private
https://github.com/ruby/irb/commit/11d03a6ff7
|
|
(https://github.com/ruby/irb/pull/898)
* Add disable_irb command to disable debug of binding.irb
* disable_irb doesn't override Kernel.exit
Kernel.exit call is removed because disable_irb does not override Kernel.exit
and workaround to https://bugs.ruby-lang.org/issues/18234 is not needed.
https://github.com/ruby/irb/commit/29901e4f21
|
|
(https://github.com/ruby/irb/pull/859)
This allows hierarchy when loading rc files for example both files below
are loaded;
project/.irbrc
~/.irbrc
https://github.com/ruby/irb/commit/b53ebc6655
Co-authored-by: Stan Lo <[email protected]>
|
|
(https://github.com/ruby/irb/pull/888)
* Remove dead irb_level method
* Restructure workspace management
Currently, workspace is an attribute of IRB::Context in most use cases.
But when some workspace commands are used, like `pushws` or `popws`, a
workspace will be created and used along side with the original workspace
attribute.
This complexity is not necessary and will prevent us from expanding
multi-workspace support in the future.
So this commit introduces a @workspace_stack ivar to IRB::Context so IRB
can have a more natural way to manage workspaces.
* Fix pushws without args
* Always display workspace stack after related commands are used
https://github.com/ruby/irb/commit/61560b99b3
|
|
commands
(https://github.com/ruby/irb/pull/887)
* Add help message to the show_source command
* Add help message to the show_doc command
https://github.com/ruby/irb/commit/06f43aadb3
|
|
(https://github.com/ruby/irb/pull/881)
https://github.com/ruby/irb/commit/83d90550c2
|
|
(https://github.com/ruby/irb/pull/876)
* Update binding.irb check for Ruby head
With https://github.com/ruby/ruby/pull/9605, backtrace in Ruby head
now has a new format. This commit updates the check for binding.irb
to work with Ruby head.
* Do not include a backtick in error messages and backtraces
[Feature #16495]
---------
https://github.com/ruby/irb/commit/ebffd3d976
Co-authored-by: Yusuke Endoh <[email protected]>
|
|
(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 <command>` syntax
* Rename banner to help_message
https://github.com/ruby/irb/commit/43a2c99f3f
|
|
(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
|