summaryrefslogtreecommitdiff
path: root/lib/irb/context.rb
diff options
context:
space:
mode:
authorStan Lo <[email protected]>2023-11-26 17:07:41 +0000
committergit <[email protected]>2023-11-26 17:07:45 +0000
commitcc5d1bf026bcc5b4929a4f9d5e32d2fa5730348c ()
tree44175f94844752733019e6f5445d249a614e42e5 /lib/irb/context.rb
parent688faa93f03142b632b8eb0de0946f4e86845ebc (diff)
[ruby/irb] Display aliases in help message
(https://.com/ruby/irb/pull/788) Similar to Pry, it displays user-defined aliases in the help message with a dedicated section. With the current default aliases, it looks like: ``` ...other sections... Aliases $ Alias for `show_source` @ Alias for `whereami` ``` https://.com/ruby/irb/commit/2a0eacc891
-rw-r--r--lib/irb/context.rb14
1 files changed, 13 insertions, 1 deletions
@@ -146,9 +146,21 @@ module IRB
@newline_before_multiline_output = true
end
- @command_aliases = IRB.conf[:COMMAND_ALIASES]
end
private def build_completor
completor_type = IRB.conf[:COMPLETOR]
case completor_type