003f3677dbad8655efa3226e98e49d8e798b4621

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #3070 from stucki/vagrant-vm-list-fix

Improve support for Vagrant VM definitions

Diff

 1diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant
 2index 9ddfa1be72c964eae113df938323da32383b959a..f842b4fbbf529d7857f5ff17641e40d7fc90229f 100644
 3--- a/plugins/vagrant/_vagrant
 4+++ b/plugins/vagrant/_vagrant
 5@@ -56,7 +56,7 @@ __box_list ()
 6 
 7 __vm_list ()
 8 {
 9-    _wanted application expl 'command' compadd $(command grep Vagrantfile -oe '^[^#]*\.vm\.define *:\([a-zA-Z0-9]\+\)' 2>/dev/null | cut -d: -f2)
10+    _wanted application expl 'command' compadd $(command grep Vagrantfile -oe '^[^#]*\.vm\.define *[:"]\([a-zA-Z0-9_-]\+\)' 2>/dev/null | awk '{print substr($2, 2)}')
11 }
12 
13 __vagrant-box ()