require 'warp/dir/command' require 'warp/dir/command/install' class Warp::Dir::Command::Help < Warp::Dir::Command description 'Show this extremely unhelpful text' aliases :wtf def run(opts, flags = []) commander = ::Warp::Dir.commander on :success do message USAGE message ' ' message 'Warp Point Commands:'.bold.green message ' ' commander.commands.select{|cmd| cmd.needs_a_point?}.map(&:command_name).each do |installed_commands| message sprintf(" %s\n", commander.find(installed_commands).help) end message ' ' message 'Global Commands:'.bold.green message ' ' commander.commands.reject{|cmd| cmd.needs_a_point?}.map(&:command_name).each do |installed_commands| message sprintf(" %s\n", commander.find(installed_commands).help) end message EXAMPLES message INSTALLATION message opts.to_s end end USAGE = < -- [ cmd-flags ] wd --help | help EOF EXAMPLES = < ]'.bold.green} If you experience any problem, please log an issue at: https://github.com/kigster/warp-dir/issues EOF else INSTALLATION = < ]'.bold.green} This command will ensure you have the wrapper installed in your ~/.bashrc or ~/.zshrc files. Once installed, just restart your shell! If you experience any problem, please log an issue at: https://github.com/kigster/warp-dir/issues EOF end end