luca@g550jk ~> fuck
Seems like fuck alias isn't configured!
Please put eval (thefuck --alias | tr '
' ';') in your ~/.config/fish/config.fish and apply changes with fish or restart your shell.
Or run fuck second time for configuring it automatically.
More details - https://github.com/nvbn/thefuck#manual-installation
luca@g550jk ~> fuck
Traceback (most recent call last):
File "/usr/bin/fuck", line 11, in <module>
load_entry_point('thefuck==3.18', 'console_scripts', 'fuck')()
File "/usr/lib/python3.6/site-packages/thefuck/not_configured.py", line 80, in main
elif _is_second_run():
File "/usr/lib/python3.6/site-packages/thefuck/not_configured.py", line 40, in _is_second_run
if not tracker_path.exists() or not shell.get_history()[-1] == 'fuck':
IndexError: list index out of range
luca@g550jk ~> thefuck --version
The Fuck 3.18 using Python 3.6.1
luca@g550jk ~> lsb_release -d
Description: Arch Linux
luca@g550jk ~> echo $SHELL
/usr/bin/fish
luca@g550jk ~> fish --version
fish, version 2.5.0
The history file for fish is no longer located in .config/fish, It's been moved to .local/share/fish. See this commit.
same error
Fixed in 3.20
Confirmed it's fixed. Thanks, @nvbn
Why does the script add
eval (thefuck --alias | tr '
' ';')
to the fish config when the wiki says something else:
thefuck --alias | source
?
But yes, adding works again fine.
It should be eval (thefuck --alias | tr '\n' ';') but the \n wasn't escaped. This can be easily fixed.
Are you interested? hint: https://hacktoberfest.digitalocean.com/
@scorphus And what's the reason it's not thefuck --alias | source as it 1. looks nicer and 2. is shorter and works the same way?
And yes, I will do a PR for this :)
Because that nice and short trick of yours didn't occur to me at all! And now, after reading eval's source code more closely, I can see that, in the end, it pipes to source.
Good job!
LGTM 馃憤
Also kudos for the commit message! 馃槈
Most helpful comment
The history file for fish is no longer located in
.config/fish, It's been moved to.local/share/fish. See this commit.