module XcodeInstall
  class Command
    class List < Command
      self.command = 'list'
      self.summary = 'List Xcodes available for download.'

      def self.options
        [['--all', 'Show all available versions.']].concat(super)
      end

      def initialize(argv)
        @all = argv.flag?('all', false)
        super
      end

      def run
        installer = XcodeInstall::Installer.new

        if @all
          puts installer.list
        else
          puts installer.list_current
        end
      end
    end
  end
end

module XcodeInstall
  class Command
    class List < Command
      self.command = 'list'
      self.summary = 'List Xcodes available for download.'

      def run
        installer = XcodeInstall::Installer.new
        puts installer.list
      end
    end
  end
end

Remove --all, and make it the default behaviour
Remove --all, and make it the default behaviour