Adding rule for forgotten '-r' when grepping folders

This commit is contained in:
Igor Santos
2015-05-15 19:09:14 -03:00
parent d7c67ad09d
commit d5bd57fb49
2 changed files with 19 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
def match(command, settings):
return (command.script.startswith('grep')
and 'is a directory' in command.stderr.lower())
def get_new_command(command, settings):
return 'grep -r {}'.format(command.script[5:])