1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 06:38:32 +00:00

implement self protecting thefuck so when people attempt to incorrectly uninstall it, it questions whether or not they really want to in a funny away

This commit is contained in:
braham delam 2019-12-08 20:02:06 -05:00
parent 9817e6a974
commit 85f32e2862

View File

@ -0,0 +1,11 @@
def match(command):
return('uninstall' in command.script and 'thefuck' in command.script)
def get_new_command(command):
new_commands = []
new_commands.append('What thefuck are you doing? Are you sure you want to uninstall? [Arrow down to uninstall]')
if('command not found' not in command.output):
new_commands.append(command.script)
return new_commands