thefuck 安装
Mac :
brew install thefuck
Ubuntu :
sudo apt update
sudo apt install python3-dev python3-pip python3-setuptools
sudo pip3 install thefuck
将此命令放在.bash_profile
、.bashrc、
、.zshrc
或其他启动脚本中:
eval $(thefuck --alias)
# You can use whatever you want as an alias, like for Mondays:
eval $(thefuck --alias FUCK)
不要忘记 source 文件名称
Mac 遇到的安装问题
一 、执行 brew install thefuck
遇到 Updating Homebrew...
不动问题
解决方法: 按 CTRL + C
取消本次更新操作 这个方法是临时的、一次性的
永久解决方法 镜像源进行加速 参考文章 https://learnku.com/articles/18908
二 、已经安装,没有链接问题
Warning: thefuck 3.18 is already installed, it's just not linked.
You can use `brew link thefuck` to link this version.
解决方法
brew link thefuck
过程中可能出现这个报错
Linking /usr/local/Cellar/thefuck/3.18...
Error: Could not symlink .
/usr/local/opt is not writable.
解决方法:更改 /usr/local 权限
sudo chmod -R g+w /usr/local
这就完事了,就是尽情的fuck了!!!
注:本篇只是实际操作于mac,其他的系统请参考官网 thefuck github 链接