Not matched unit tests, code style.

This commit is contained in:
Michael Lee
2015-08-20 09:41:01 +01:00
parent 004c0d06eb
commit 7cb0388ed0
2 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -4,9 +4,10 @@ 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
return shells.and_("vagrant up " + machine, command.script)