    # File lib/chef/knife/core/generic_presenter.rb, line 167
            def format_cookbook_list_for_display(item)
              if config[:with_uri]
                item.inject({}) do |collected, (cookbook, versions)|
                  collected[cookbook] = Hash.new
                  versions['versions'].each do |ver|
                    collected[cookbook][ver['version']] = ver['url']
                  end
                  collected
                end
              else
                versions_by_cookbook = item.inject({}) do |collected, ( cookbook, versions )|
                  collected[cookbook] = versions["versions"].map {|v| v['version']}
                  collected
                end
                key_length = versions_by_cookbook.empty? ? 0 : versions_by_cookbook.keys.map {|name| name.size }.max + 2
                versions_by_cookbook.sort.map do |cookbook, versions|
                  "#{cookbook.ljust(key_length)} #{versions.join('  ')}"
                end
              end
            end