summaryrefslogtreecommitdiff
path: root/lib/irb/command/context.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-05-29 07:54:39 +0900
committerGitHub <noreply@github.com>2024-05-28 15:54:39 -0700
commit077558ee2b8dd3ed414b78384f21118f833eb259 (patch)
tree016aceed4ca1c0ab049fc2a6260a9267677b1ea5 /lib/irb/command/context.rb
parent917f3e5d22b3364002eb1fdc2f94b35ff76f6a73 (diff)
[Bug #20511] Update reline-0.5.7 (#10848)
* Update reline-0.5.7 * Update irb-1.13.1
Diffstat (limited to 'lib/irb/command/context.rb')
-rw-r--r--lib/irb/command/context.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/irb/command/context.rb b/lib/irb/command/context.rb
new file mode 100644
index 0000000000..b4fc807343
--- /dev/null
+++ b/lib/irb/command/context.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module IRB
+ module Command
+ class Context < Base
+ category "IRB"
+ description "Displays current configuration."
+
+ def execute(_arg)
+ # This command just displays the configuration.
+ # Modifying the configuration is achieved by sending a message to IRB.conf.
+ Pager.page_content(IRB.CurrentContext.inspect)
+ end
+ end
+ end
+end