Added pacman invalid option rule (#960)

* Added pacman invalid option rule

* Added test

* flake8 fixes

* Test changes

* Test fix

* Typo - again

* Travis test fix

* More Travis

* Even more travis

* I hope im right here

* Update README.md

Co-Authored-By: Pablo Aguiar <scorphus@gmail.com>

* Update thefuck/rules/pacman_invalid_option.py

Co-Authored-By: Pablo Aguiar <scorphus@gmail.com>

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
This commit is contained in:
DragonGhost7
2020-03-28 18:15:20 -04:00
committed by GitHub
parent d3a05426de
commit 3c542a5b8c
3 changed files with 36 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from thefuck.specific.archlinux import archlinux_env
import re
def match(command):
return "error: invalid option '-s'" in command.output
def get_new_command(command):
opt = re.findall(r" -[dqrstuf]", command.script)[0]
return re.sub(opt, opt.upper(), command.script)
enabled_by_default = archlinux_env()