Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a survay draft pull request for command implementation.
Description
There are two types of IRB's command.
whereami
cws object
show_source 'Set#to_a'
$ Set#to_a
(some command accepts non-ruby syntax)context.echo = false
app.host
(rails console)helper.javascript_url('application')
(rails console)What should IRB command be?
For the past years
Command is a ruby method installed into current workspace object.
After
show_source Set#to_a
$ Set#to_a
is introducedComamnd is a ruby method.
Command is also a UNIX-command-like-instruction
command_name free_format_args
for commands that hastransform_args
.Command definition in this survey
Command is a UNIX-command-like-instruction
command_name free_format_args
. defined in@EXTEND_COMMANDS
.There are some extension methods(≠command) defined as a method of ExtendCommandBundle and aliases are in
@ALIASES
.Pros
We can remove
transform_args
.Workspace object will less polluted by installed methods.
Some inconsistent behavior of command will improve
Cons
10.times{show_source 'Set#to_a'}
method-command
. (naming...)Other possibility
Specify command type
:command or :method
in command definitionThis seems better for me, but we should consider how to make no breaking change.