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:
parent
a6c4c6950d
commit
07137ee5e5
|
@ -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(*)
|
||||
|
|
Loading…
Reference in New Issue