Skip to content

Commit

Permalink
Disable pager when TERM is not set too (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 authored Dec 5, 2023
1 parent 8a3002a commit 1739809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/pager.rb
Original file line number Diff line number Diff line change
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 1739809

Please sign in to comment.