Mac zsh not found jupyter notebook

zsh是一个很好的终端模拟器,在自动补全上面很好用。但是在初次使用的过程中,发现以前在bash里面的配置文件不能移植过来,解决的办法如下:

打开vim ~/.zshrc
加入 source ~/.bash_profile
:wq 保存
source ~/.zshrc
就可以完美的使用zsh了

zsh安装

mac自带zsh
切换zsh很简单 chsh zsh就可以切换过来

zsh配置

oh-my-zsh 帮我们整理了一些常用的 Zsh 扩展功能和主题:https://github.com/robbyrussell/oh-my-zsh
我们无需自己去捣搞 Zsh,直接用 oh-my-zsh 就足够了,如果你想继续深造的话那再去弄。
先安装 git:brew install git
安装 oh-my-zsh(这个过程可能会有点慢,或者需要重试几次):
sh -c “$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)”
后发现不显示主机名和用户名,vim .zshrc

PROMPT=’%{ f g [ g r e e n ] fg[green]%}%m@%{ fg[green]fg[magenta]%}%(?..%?%1v)%n:%{ r e s e t c o l o r reset_color%}%{ resetcolorfg[cyan]%}%~#’
有时候提醒有些文件夹不安全

Insecure completion-dependent directories detected:
lrwxr-xr-x  1 andrew  admin  39 10 28 19:16 /usr/local/share/zsh/site-functions/_brew -> ../../../Homebrew/completions/zsh/_brew
lrwxr-xr-x  1 andrew  admin  44 10 28 19:16 /usr/local/share/zsh/site-functions/_brew_cask -> ../../../Homebrew/completions/zsh/_brew_cask
lrwxr-xr-x  1 andrew  admin  58 10 29 11:27 /usr/local/share/zsh/site-functions/_git -> ../../../Cellar/git/2.23.0_1/share/zsh/site-functions/_git

[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.

[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh]     compaudit | xargs chmod g-w,o-w

[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.

简单粗暴的方法是在 .zshrc的最前面加入
ZSH_DISABLE_COMPFIX=true

最后激活一下:
source .zshrc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值