Files
thefuck/thefuck/rules/rm_root.py
T
SpyCheese ceeccf1cd7 Update rm_root.py
Okay, there was an incorrect match function.
2015-04-19 10:21:46 +05:00

9 lines
287 B
Python

def match(command, settings):
return ('/' in command.script.split()
and '--no-preserve-root' not in command.script
and '--no-preserve-root' in command.stderr)
def get_new_command(command, settings):
return '{} --no-preserve-root'.format(command.script)