class Ki::KiCommandHelp
Displays help for given command
Public Instance Methods
execute(ctx, args)
click to toggle source
Finds matching command and displays its help
# File lib/cmd/cmd.rb, line 154 def execute(ctx, args) if args.size == 1 puts ctx.find_cmd(args.first).help puts "Common ki options:\n#{ctx.opts}" else finder = ctx.ki_home.finder puts <<EOF ki-repo is a repository for storing packages and metadata. #{help} Info: Home directory: #{ctx.ki_home.path} Repositories: #{finder.all_repositories.map { |repo| " - #{repo.path} (components: #{repo.components.size})" }.join("\n")} Components in all repositories: #{finder.components.size} Available commands: EOF KiInfoCommand.new.execute(ctx, ["-c"]) puts "\nRun '#{$0} help COMMAND' for more information about that command." end end
help()
click to toggle source
# File lib/cmd/cmd.rb, line 178 def help <<EOF "#{shell_command}" shows information Ki and its commands. ### Examples #{shell_command} #{shell_command} version-build EOF end