kura/vagrant-bash-completion — pull request #8 by deanmalmgren (2013-07-20 11:28:57+00:00)
Title: .vagrant directory holds state?

I'm running vagrant 1.2.2 on OS X 10.6.8. I'm not sure if this is an OS-specific difference or whether vagrant started storing its state differently, but I do not have a `.vagrant` file --- I have a `.vagrant/` directory --- that stores the state of the currently running (and previously launched) vagrant boxes in a format that looks like this:

# tree .vagrant
.vagrant
└── machines
├── vm-numero-uno
│ └── rackspace
│ └── id
├── vm-numero-dos
│ └── virtualbox
└── vm-numero-tres
└── virtualbox
└── id

In this case, virtual machines `vm-numero-uno` and vm-numero-tres` are running because they have the `id` file. Virtual machine `vm-numero-dos` is not currently running but has been run before. The present solution works on my system to identify all of these machines.

The tricky bit is that this directory structure is launched *the first time* a machine is `vagrant up`-ed. So if you add a new virtual machine called `vm-numero-tres`, it isn't possible to tab complete on the name. How does the present solution work with the `.vagrant` file? Are unlaunched virtual machines stored in the .vagrant file somehow or is this problem present there too?

If its a common issue, we could probably do something smart with `vagrant status`, but I'd definitely prefer not to because it is s------l-------o--------w.