starts up vagrant if not already running

This commit is contained in:
Michael Lee
2015-08-19 17:12:54 +01:00
parent abbbd1f8eb
commit 004c0d06eb
3 changed files with 38 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
from thefuck import shells
def match(command, settings):
return command.script.startswith('vagrant ') and 'run `vagrant up`' in command.stderr.lower()
def get_new_command(command, settings):
cmds = command.script.split(' ')
machine = ""
if len(cmds) >= 3:
machine = cmds[2]
return "vagrant up " + machine + " && " + command.script