Add tsuru_login rule

This commit is contained in:
Pablo Santiago Blum de Aguiar
2015-07-25 20:59:18 -03:00
parent bfa3c905a3
commit 2117659c40
3 changed files with 49 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
from thefuck import shells
def match(command, settings):
return (command.script.startswith('tsuru')
and 'not authenticated' in command.stderr
and 'session has expired' in command.stderr)
def get_new_command(command, settings):
return shells.and_('tsuru login', command.script)