summaryrefslogtreecommitdiff
path: root/lib/irb/cmd/chws.rb
diff options
context:
space:
mode:
authorStan Lo <[email protected]>2022-12-08 19:10:19 +0000
committergit <[email protected]>2022-12-08 19:10:23 +0000
commit3956bb859c2442d34ea171db8f92f3e5895c43d9 (patch)
tree4800d4eb49ceadec321f37e644ab98fb1f597aa6 /lib/irb/cmd/chws.rb
parent2cea8e014dbbbb68e4e8be367529b2beae564c54 (diff)
[ruby/irb] Add "show_cmds" command to list all commands'
descriptions (https://github.com/ruby/irb/pull/463) https://github.com/ruby/irb/commit/7e857655ac
Diffstat (limited to 'lib/irb/cmd/chws.rb')
-rw-r--r--lib/irb/cmd/chws.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/irb/cmd/chws.rb b/lib/irb/cmd/chws.rb
index b28c090686..7c84ba0a4b 100644
--- a/lib/irb/cmd/chws.rb
+++ b/lib/irb/cmd/chws.rb
@@ -19,12 +19,18 @@ module IRB
module ExtendCommand
class CurrentWorkingWorkspace < Nop
+ category "IRB"
+ description "Show the current workspace."
+
def execute(*obj)
irb_context.main
end
end
class ChangeWorkspace < Nop
+ category "IRB"
+ description "Change the current workspace to an object."
+
def execute(*obj)
irb_context.change_workspace(*obj)
irb_context.main