Suggest ag -Q when relevant

This detects when `ag` suggests the `-Q` option, and adds it.
This commit is contained in:
Joseph Frazier
2016-10-03 00:30:48 -04:00
parent db7dffdb44
commit db4b37910d
3 changed files with 37 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
from thefuck.utils import for_app
from thefuck.utils import replace_argument
@for_app('ag')
def match(command):
return 'run ag with -Q' in command.stderr
def get_new_command(command):
return command.script.replace('ag', 'ag -Q', 1)