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:
@@ -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()
|
||||
Reference in New Issue
Block a user