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:
parent
a6c4c6950d
commit
07137ee5e5
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue