1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-21 01:59:10 +00:00
thefuck/thefuck/rules/fix_alt_space.py

16 lines
331 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- encoding: utf-8 -*-
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command, settings):
return ('command not found' in command.stderr.lower()
and u' ' in command.script)
@sudo_support
def get_new_command(command, settings):
return re.sub(u' ', ' ', command.script)