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

你可能感兴趣的:(linux)