diff --git a/thefuck/rules/rm_root.py b/thefuck/rules/rm_root.py index 95d9fbdd..b97eda22 100644 --- a/thefuck/rules/rm_root.py +++ b/thefuck/rules/rm_root.py @@ -1,6 +1,6 @@ def match(command, settings): - return ('rm' in command.script - and '--help' not in command.script + return ('/' in command.script + and '--no-preserve-root' not in command.script and '--no-preserve-root' in command.stderr)