Mac 终端命令行插件 fish 的安装过程记录
fish是帅当时我买了macbook之后就帮我装的,后来重装了一次系统,我就自己手动装了一次。
前提是我已经安装好了homebrew,如果没有安装homebrew也可以在github上,找到fish的安装包,或者百度一下。
1、安装 fish
打开终端,输入: brew install fish
brew开始执行安装,安装结果如下:
[LXMAJS]:issues lxmajs$ brew install fish
Updating Homebrew...
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
alexjs chakra
==> Installing dependencies for fish: pcre2
==> Installing fish dependency: pcre2
==> Downloading https://homebrew.bintray.com/bottles/pcre2-10.32.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pcre2-10.32.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/pcre2/10.32: 224 files, 5.5MB
==> Installing fish
==> Downloading https://homebrew.bintray.com/bottles/fish-3.0.0.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fish-3.0.0.mojave.bottle.tar.gz
==> Caveats
You will need to add:
/usr/local/bin/fish
to /etc/shells.
Then run:
chsh -s /usr/local/bin/fish
to make fish your default shell.
==> Summary
🍺 /usr/local/Cellar/fish/3.0.0: 953 files, 8.3MB
==> Caveats
==> fish
You will need to add:
/usr/local/bin/fish
to /etc/shells.
Then run:
chsh -s /usr/local/bin/fish
to make fish your default shell.
2、修改shell的配置
安装成功后,看到如上的最后几行提示,还需要再 shells文件中添加 /usr/local/bin/fish。
另外开启一个终端,输入:sudo vim /etc/shells
然后在最后空白处添加:
3、重启shell
保存好以后,回到刚才的终端窗口,按照上面的提示输入:chsh -s /usr/local/bin/fish
至此,fish就完成安装和配置了。在另外开启一个终端,会看到自动进入了fish之中。