mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-30 06:34:09 +00:00
Add apt_upgrade rule (#761)
* apt_list_upgradable: Prepend sudo to suggestion if used in command * Add apt_upgrade rule This suggests `apt upgrade` after `apt list --upgradable` if there are packages to upgrade. It pairs well with the `apt_list_upgradable` rule, which suggests `apt list --upgradable` after `apt update` if there are packages to upgrade. * Add apt_upgrade rule to README
This commit is contained in:
committed by
Vladimir Iakovlev
parent
7e6d1dbc7c
commit
a696461cd3
@@ -69,4 +69,7 @@ def test_not_match(command):
|
||||
|
||||
def test_get_new_command():
|
||||
new_command = get_new_command(Command('sudo apt update', match_output))
|
||||
assert new_command == 'sudo apt list --upgradable'
|
||||
|
||||
new_command = get_new_command(Command('apt update', match_output))
|
||||
assert new_command == 'apt list --upgradable'
|
||||
|
||||
Reference in New Issue
Block a user