Thefuck: Please put eval $(thefuck --alias) in your ~/.zshrc.

Created on 8 Jan 2017  Â·  10Comments  Â·  Source: nvbn/thefuck

I've just installed thefuck by sudo -H pip install thefuck & now when i type fuck and hit the enter it says:

Seems like fuck alias isn't configured!
Please put eval $(thefuck --alias) in your ~/.zshrc.
More details - https://github.com/nvbn/thefuck#manual-installation

when i added the line to my .zsh file, it's still same.
what should i do now to fix the problem?

next release osx

Most helpful comment

There's a bug, it should suggest .bash_profile if .bashrc doesn't exists.

All 10 comments

A similar issue occurs on macOS Sierra.

Michaels-MacBook-Pro:base Michael$ fuck
Seems like fuck alias isn't configured!
Please put eval $(thefuck --alias) in your ~/.bashrc.
More details - https://github.com/nvbn/thefuck#manual-installation

It _is_ already in my ~/.bashrc.

image

Have you tried restarting shell or doing source ~/.bashrc?

@nvbn

Michaels-MacBook-Pro:~ Michael$ source ~/.bashrc
Michaels-MacBook-Pro:~ Michael$ fuck
open ~/.bashrc [enter/↑/↓/ctrl+c]
Aborted

Restarted terminal ->

Michaels-MacBook-Pro:~ Michael$ fuck
Seems like fuck alias isn't configured!
Please put eval $(thefuck --alias) in your ~/.bashrc.
More details - https://github.com/nvbn/thefuck#manual-installation

It appears to work until I need to restart Terminal.

It appears to work until I need to restart Terminal.

So probably on OSX ~/.bashrc doesn't get sourced automatically? This stackoverflow question may give some insight.

@rnestler This works, however it will open .bash_profile every time I invoke fuck for the first time.

My addition to .bash_profile:

# The Fuck configuration.
eval $(thefuck --alias)

There's a bug, it should suggest .bash_profile if .bashrc doesn't exists.

I just started using mac and I had no ideia about this. This thread helped a lot. Thanks :)

Over time the issue with TextEdit popping up went away. Looks like it was
fetching it from a prior command I had made. Adding the eval.... to
.bash_profile solves the issue entirely.

Fixed in 3.16.

💯

Was this page helpful?
0 / 5 - 0 ratings