1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Add pager detection by using which command

Fix issue #743 (pager gives warnings `Missing filename ("less --help"
for help)`)

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
This commit is contained in:
Kyrylo Silin 2012-11-19 23:37:03 +02:00
parent a6c4c6950d
commit 07137ee5e5

View file

@ -51,7 +51,9 @@ class Pry::Pager
end
def self.available?
`#{default_pager}`rescue nil
pager_executable = default_pager.split(' ').first
`which #{ pager_executable }`
rescue
end
def initialize(*)