Method: TTY::Pager::SystemPager.find_executable
- Defined in:
- lib/tty/pager/system.rb
.find_executable(*commands) ⇒ String?
Find first available termainal pager program executable
92 93 94 95 96 97 |
# File 'lib/tty/pager/system.rb', line 92 def self.find_executable(*commands) execs = commands.empty? ? executables : commands execs .compact.map(&:strip).reject(&:empty?).uniq .find { |cmd| command_exist?(cmd.split.first) } end |