From c1f9a09f70c1d60a10a986e8f03bdf1c668657ca Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Tue, 5 Dec 2023 16:13:08 +0000 Subject: [PATCH] Disable pager when TERM is not set too --- lib/irb/pager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/pager.rb b/lib/irb/pager.rb index d50348786..3391b32c6 100644 --- a/lib/irb/pager.rb +++ b/lib/irb/pager.rb @@ -41,7 +41,7 @@ def page(retain_content: false) private def should_page? - IRB.conf[:USE_PAGER] && STDIN.tty? && ENV["TERM"] != "dumb" + IRB.conf[:USE_PAGER] && STDIN.tty? && (ENV.key?("TERM") && ENV["TERM"] != "dumb") end def content_exceeds_screen_height?(content)