Open nwinkler opened 9 years ago
I think this can be fixed by changing the alias to use eval
:
alias fuck='eval $(thefuck $(fc -ln -1))'
This makes it work for me:
$ fuck
ps -ef | grep foo
502 12900 2764 0 11:13am ttys003 0:00.00 grep --color=auto foo
I'll create a PR for this...
Reopened because in the future rules should be applied to every part of a command with pipes.
Yes, good point. I've seen that the no_command
rule only fixes the first part of the command. Something like ps -ef | lss
currently doesn't get fixed, since it doesn't check for possible alternatives for lss
.
Still doesn't work. Example: ps aux | grep 'ruby'
Output -> No fucks given
Is anyone looking at this still?
$ find . | grepp \.go
Command 'grepp' not found, did you mean:
command 'grep' from deb grep (3.4-1)
Try: sudo apt install <deb name>
$ fuck
No fucks given
It looks like
fuck
doesn't handle pipes well. If I try to do this in Bash:It looks like the command is executed in the wrong way, it seems like it's trying to execute it as a single command, instead of treating it as a line of input with potentially multiple commands.