Files
thefuck/thefuck/rules/rm_root.py
T
2015-04-19 09:03:34 +05:00

9 lines
268 B
Python

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