1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 12:06:04 +00:00

Create rm_root.py

This commit is contained in:
SpyCheese 2015-04-19 09:03:34 +05:00
parent 3f0cbb9326
commit 2a79a5e413

8
thefuck/rules/rm_root.py Normal file
View File

@ -0,0 +1,8 @@
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)