0. 结论
放弃了, fish 另起一套的命令导致在远程服务器上无法直接套用
1. 为啥用fish
感受一下 friendly interactive shell 有多friendly (其实是zsh用太久了, 想尝鲜, hhh
2. 安装步骤
-
安装fish
brew install fish
-
修改为默认shell (参见官方文档
- Add the shell to
/etc/shells
with:
echo /usr/local/bin/fish | sudo tee -a /etc/shells
- Change your default shell with:
chsh -s /usr/local/bin/fish
- 重新打开shell
- Add the shell to
-
安装fisher
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
-
安装z-jump
fisher install jethrokuan/z
-
安装 oh-my-fish a. [墙… ]
curl -L https://get.oh-my.fish | fish
b. [wroked]
git clone https://github.com/oh-my-fish/oh-my-fish cd oh-my-fish bin/install --offline
-
安装皮肤 ays
omf install ays
3. 进行一些常用的调整
-
添加自定义配置文件
touch ~/.config/fish/config.fish
-
更换命令补全快捷键为 ctrl - j
# ~/.config/fish/config.fish bind \cj accept-autosuggestion
-
添加刷新fish配置命令,通过sfish (source fish) 来刷新新增配置
# ~/.config/fish/functions/sfish.fish function sfish source /Users/nsity/.config/fish/config.fish end
-
集成fd,bat
todo
4. 体验
- 补全提示很美
- 速度好像的确比zsh快一些(不知道是不是错觉