Merge branch 'master' of github.com:nvbn/thefuck into fix-unzip

This commit is contained in:
mcarton
2015-09-07 20:51:55 +02:00
176 changed files with 1058 additions and 928 deletions
+3 -3
View File
@@ -25,18 +25,18 @@ def _tar_file(cmd):
@for_app('tar')
def match(command, settings):
def match(command):
return ('-C' not in command.script
and _is_tar_extract(command.script)
and _tar_file(command.script) is not None)
def get_new_command(command, settings):
def get_new_command(command):
return shells.and_('mkdir -p {dir}', '{cmd} -C {dir}') \
.format(dir=_tar_file(command.script)[1], cmd=command.script)
def side_effect(old_cmd, command, settings):
def side_effect(old_cmd, command):
with tarfile.TarFile(_tar_file(old_cmd.script)[0]) as archive:
for file in archive.getnames():
try: