f1cce413b3
Happens on the Mac a lot when typing a pipe character (Alt+7), and keeping the Alt key pressed down for a bit too long, so instead of Space, you're typing Alt+Space. This rule replaces the Alt+Space with a simple Space character. $ ps -ef | grep foo -bash: grep: command not found $ fuck ps -ef | grep foo
16 lines
323 B
Python
16 lines
323 B
Python
# -*- encoding: utf-8 -*-
|
||
|
||
import re
|
||
from thefuck.utils 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)
|