1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-20 01:28:56 +00:00
thefuck/thefuck/rules/fix_alt_space.py
2017-08-31 17:58:56 +02:00

16 lines
311 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):
return ('command not found' in command.output.lower()
and u' ' in command.script)
@sudo_support
def get_new_command(command):
return re.sub(u' ', ' ', command.script)