mirror of
https://github.com/nvbn/thefuck.git
synced 2025-04-15 07:10:52 +01:00
14 lines
309 B
Python
14 lines
309 B
Python
import os
|
|
from thefuck.specific.sudo import sudo_support
|
|
|
|
|
|
@sudo_support
|
|
def match(command):
|
|
return command.script_parts and os.path.exists(command.script_parts[0]) \
|
|
and 'command not found' in command.stderr
|
|
|
|
|
|
@sudo_support
|
|
def get_new_command(command):
|
|
return u'./{}'.format(command.script)
|