Fish Shell 使用笔记
安装Fish Shell
brew install fish
curl -L https://get.oh-my.fish | fish
安装Fisher
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
配置 autojump
clone
autojumpgit clone https://github.com/wting/autojump.git
安装 autojump 至本地
~/.autojump目录:cd autojump ./install.py
- 在fish配置中打开文件~/.config/fish/config。在编辑器中查找并添加以下行:
begin set --local AUTOJUMP_PATH $HOME/.autojump/share/autojump/autojump.fish if test -e $AUTOJUMP_PATH source $AUTOJUMP_PATH end end退出fish,重新开始。使用cd命令访问常用目录。你现在可以使用j命令跳转到这些目录:
exit j testDir
跳转到当前目录的子目录:
jc chid_dir
- 查看
autojump历史记录中的条目统计信息:
j -s
- 查看
使用
finder打开目录jo dir
配置
nvm使用fish之后,之前配置的
nvm就不能用了,需要在~/.config/fish/config当中添加nvm的配 置begin set --local AUTOJUMP_PATH $HOME/.autojump/share/autojump/autojump.fish if test -e $AUTOJUMP_PATH source $AUTOJUMP_PATH end function nvm bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv end end
默认
shell切换至fishecho /usr/local/bin/fish | sudo tee -a /etc/shells chsh -s /usr/local/bin/fish
Fish shell 入门教程
使用版本:Autojump 22.5.1, Fish 3.0.0和Mac 10.14.2
相关推荐
laisean 2020-11-11
zhangjie 2020-11-11
大牛牛 2020-10-30
firefaith 2020-10-30
liguojia 2020-10-20
wangzhaotongalex 2020-10-20
CARBON 2020-10-20
JohnYork 2020-10-16
xiaonamylove 2020-10-16
Julyth 2020-10-16