From 054fd0b166782d30af5723002600a30c59dd87dd Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Mon, 16 Oct 2017 19:09:44 +0200 Subject: [PATCH] #702: Make `match` in `php_s` rule more strict --- thefuck/rules/php_s.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/thefuck/rules/php_s.py b/thefuck/rules/php_s.py index 114fb153..65f50392 100644 --- a/thefuck/rules/php_s.py +++ b/thefuck/rules/php_s.py @@ -1,9 +1,10 @@ from thefuck.utils import replace_argument, for_app -@for_app('php') +@for_app('php', at_least=2) def match(command): - return " -s " in command.script + return ('-s' in command.script_parts + and command.script_parts[-1] != '-s') def get_new_command(command):