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

Created on 9 Mar 2017  Â·  8Comments  Â·  Source: nvbn/thefuck

Hi everyone,

this thing seems amazing. I tried to install it (on ArchLinux, under zsh), and I found quite ironic that when I typed fuck in my terminal, he told me

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

Since I've seen the example with aptget install changing to apt-get install and then, sudo apt-get install, I was quite disappointed that when I typed fuck again in the terminal, he didn't automatically add it in my zshrc and sourced it.

next release

Most helpful comment

So I've implemented something like this:
tty
(not released yet)

All 8 comments

(Sorry to have closed and reopened this issue, I thought it was a duplicate of #585 but it was not)

It just means to add eval $(thefuck --alias) line to your .zshrc and reload your zsh shell. Just run the following and you should be good to go:

```
echo 'eval $(thefuck --alias)' >> ~/.zshrc; exec zsh
````

Yeah but I mean, launching fuck a second time could do it by itself since it knows exactly what I'm supposed to do. Wouldn't that be awesome ?

I guess the nicest way would be if first call to fuck would just configure everything automatically.
So it would be like:

➜ fuck
Alias configured successfully. To apply changes please relaunch your shell or just run:
   source ~/.zshrc

Yeah, or maybe you'd need to type fuck twice before it modifies your zshrc, like so

$ fuck
Seems like fuck alias isn't configured!
Please put eval $(thefuck --alias) in your ~/.zshrc.
More details - https://github.com/nvbn/thefuck#manual-installation
$ fuck
Alias configured successfully. To apply changes please relaunch your shell or just run:
   source ~/.zshrc

in case someone doesn't want its zshrc to be modified (for example, I have my aliases in a particular file that is sourced from my zshrc and I like to keep it that way).

I think its consistant with the successive corrections shown in the gif in the readme.

So I've implemented something like this:
tty
(not released yet)

This rocks so hard

Should work in 3.15.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cuwaters picture cuwaters  Â·  4Comments

pizzathief picture pizzathief  Â·  6Comments

griffinqiu picture griffinqiu  Â·  4Comments

BertieJim picture BertieJim  Â·  3Comments

whereistejas picture whereistejas  Â·  4Comments