コード例 #1
0
ファイル: dirty_untar.py プロジェクト: wzkacxl/thefuck
def get_new_command(command):
    dir = shells.quote(_tar_file(command.script_parts)[1])
    return shells.and_('mkdir -p {dir}', '{cmd} -C {dir}') \
        .format(dir=dir, cmd=command.script)
コード例 #2
0
ファイル: dirty_unzip.py プロジェクト: pakrym/thefuck
def get_new_command(command):
    return u'{} -d {}'.format(command.script, quote(_zip_file(command)[:-4]))
コード例 #3
0
ファイル: dirty_untar.py プロジェクト: flying-potato/thefuck
def get_new_command(command):
    dir = shells.quote(_tar_file(command.script_parts)[1])
    return shells.and_('mkdir -p {dir}', '{cmd} -C {dir}') \
        .format(dir=dir, cmd=command.script)