Skip to content

Commit

Permalink
[ruby/irb] Disable pager when TERM is not set too
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 authored and matzbot committed Dec 5, 2023
1 parent ef387e6 commit f55746a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/pager.rb
Expand Up @@ -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)
Expand Down

0 comments on commit f55746a

Please sign in to comment.