mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
Merge branch 'patch-1' of git://github.com/SpyCheese/thefuck into SpyCheese-patch-1
This commit is contained in:
commit
14ef5c7d1c
8
thefuck/rules/rm_root.py
Normal file
8
thefuck/rules/rm_root.py
Normal file
@ -0,0 +1,8 @@
|
||||
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)
|
Loading…
x
Reference in New Issue
Block a user