Method: Ki::KiCommandHelp#execute
- Defined in:
- lib/cmd/cmd.rb
#execute(ctx, args) ⇒ Object
Finds matching command and displays its help
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# 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 |