require "vagrant-list/version"
require "vagrant/vm_info"
require "vagrant"
require "pp"

module Vagrant
  module List
    class All < ::Vagrant::Command::Base
      def execute
        names = Driver::VirtualBox.new(nil).read_vms

        pp names.map { |uuid| Vagrant::VMInfo.new(uuid).uuid }
      end
    end
  end
end

Vagrant.commands.register(:list) { Vagrant::List::All }

require "vagrant-list/version"
require "vagrant/vm_info"
require "vagrant"
require "pp"

module Vagrant
  module List
    class All < ::Vagrant::Command::Base
      def execute
        all = Driver::VirtualBox.new(nil).read_vms(:vms)
        @env.ui.info "ALL:"
        all.each do |uuid|
          @env.ui.info Vagrant::VMInfo.new(uuid).inspect
        end

        running = Driver::VirtualBox.new(nil).read_vms(:runningvms)
        @env.ui.info "RUNNING:"
        running.each do |uuid|
          @env.ui.info Vagrant::VMInfo.new(uuid).inspect
        end
      end
    end
  end
end

Vagrant.commands.register(:list) { Vagrant::List::All }

Extend vagrant list command to print both All vms, and running vms
Extend vagrant list command to print both All vms, and running vms
