<commit_before>module Brightbox
  command [:images] do |cmd|

    cmd.desc "Show detailed image info"
    cmd.arg_name "image-id..."
    cmd.command [:show] do |c|

      c.action do |global_options, options, args|

        if args.empty?
          raise "You must specify the images you want to show"
        end

        images = Image.find_or_call(args) do |id|
          warn "Couldn't find image #{id}"
        end

        display_options = {
          :vertical => true,
          :fields => [
            :id, :type, :owner, :created_at, :status, :arch, :name,
            :description, :username, :virtual_size, :disk_size, :public,
            :"compatibility_mode", :official, :ancestor_id, :licence_name
          ]
        }

        table_opts = global_options.merge(display_options)

        render_table(images, table_opts)
      end<commit_msg>Make `images show` behave like other commands<commit_after>module Brightbox
  command [:images] do |cmd|

    cmd.desc "Show detailed image info"
    cmd.arg_name "image-id..."
    cmd.command [:show] do |c|

      c.action do |global_options, options, args|
        images = Image.find_all_or_warn(args)

        display_options = {
          :vertical => true,
          :fields => [
            :id, :type, :owner, :created_at, :status, :arch, :name,
            :description, :username, :virtual_size, :disk_size, :public,
            :"compatibility_mode", :official, :ancestor_id, :licence_name
          ]
        }

        table_opts = global_options.merge(display_options)

        render_table(images, table_opts)
      end
{'fraction_non_alphanumeric': 0.11536050156739812, 'fraction_numerical': 0.0, 'mean_word_length': 2.3043478260869565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '239487', 'n_tokens_mistral': 497, 'n_tokens_neox': 479, 'n_words': 124}