module Byebug::Helpers::BinHelper

def which(cmd)


Adapted from: https://gist.github.com/steakknife/88b6c3837a5e90a08296
Cross-platform way of finding an executable in the $PATH.
def which(cmd)
  return File.expand_path(cmd) if File.exist?(cmd)
  [nil, *search_paths].each do |path|
    exe = find_executable(path, cmd)
    return exe if exe
  end
  nil
end