#728: Add heroku_multiple_apps rule (#729)

Closes https://github.com/nvbn/thefuck/issues/728
This commit is contained in:
Joseph Frazier
2017-11-09 18:42:23 -05:00
committed by GitHub
parent 8fb5ddefb6
commit 10ac1a3b38
3 changed files with 68 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import re
from thefuck.utils import for_app
@for_app('heroku')
def match(command):
return 'https://devcenter.heroku.com/articles/multiple-environments' in command.output
def get_new_command(command):
apps = re.findall('([^ ]*) \([^)]*\)', command.output)
return [command.script + ' --app ' + app for app in apps]