mirror of
https://github.com/nvbn/thefuck.git
synced 2025-11-20 00:36:01 +00:00
14 lines
317 B
Python
14 lines
317 B
Python
import re
|
|
from thefuck.utils import sudo_support
|
|
|
|
|
|
@sudo_support
|
|
def match(command, settings):
|
|
return ('mkdir' in command.script
|
|
and 'No such file or directory' in command.stderr)
|
|
|
|
|
|
@sudo_support
|
|
def get_new_command(command, settings):
|
|
return re.sub('^mkdir (.*)', 'mkdir -p \\1', command.script)
|