class Bundler::CLI
def help(cli = nil)
def help(cli = nil) case cli when "gemfile" then command = "gemfile.5" when nil then command = "bundle" else command = "bundle-#{cli}" end manpages = %w( bundle bundle-config bundle-exec bundle-install bundle-package bundle-update gemfile.5) if manpages.include?(command) root = File.expand_path("../man", __FILE__) if have_groff? && root !~ %r{^file:/.+!/META-INF/jruby.home/.+} groff = "groff -Wall -mtty-char -mandoc -Tascii" pager = ENV['MANPAGER'] || ENV['PAGER'] || 'less -R' Kernel.exec "#{groff} #{root}/#{command} | #{pager}" else puts File.read("#{root}/#{command}.txt") end else super end end