mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-12 07:59:01 +00:00
Change The file
This commit is contained in:
parent
3bbd0e9463
commit
8ff2336293
@ -184,6 +184,8 @@ def test_get_operations(set_help):
|
|||||||
'dnf install vim'),
|
'dnf install vim'),
|
||||||
('dnf saerch vim', invalid_command('saerch'),
|
('dnf saerch vim', invalid_command('saerch'),
|
||||||
'dnf search vim'),
|
'dnf search vim'),
|
||||||
|
('dnf uninstall vim', invalid_command('uninstall'),
|
||||||
|
'dnf remove vim'),
|
||||||
])
|
])
|
||||||
def test_get_new_command(set_help, output, script, result):
|
def test_get_new_command(set_help, output, script, result):
|
||||||
set_help(help_text)
|
set_help(help_text)
|
||||||
|
@ -30,8 +30,11 @@ def _get_operations():
|
|||||||
|
|
||||||
@sudo_support
|
@sudo_support
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
misspelled_command = regex.findall(command.output)[0]
|
if misspelled_command == 'uninstall':
|
||||||
return replace_command(command, misspelled_command, _get_operations())
|
return [command.script.replace('uninstall','remove')
|
||||||
|
else:
|
||||||
|
misspelled_command = regex.findall(command.output)[0]
|
||||||
|
return replace_command(command, misspelled_command, _get_operations())
|
||||||
|
|
||||||
|
|
||||||
enabled_by_default = dnf_available
|
enabled_by_default = dnf_available
|
||||||
|
Loading…
x
Reference in New Issue
Block a user