Think before you speak, read before you think.

zsh .zprofile

从 macOS Catalina 开始,zsh 成为了默认 shell

https://support.apple.com/en-us/HT208050

.zprofile 相当于 .bash_profile
.zshrc 相当于 .bashrc


fix error
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]? ccompinit: initialization aborted
complete:13: command not found: compdef
complete:13: command not found: compdef
complete:13: command not found: compdef
检查$ compaudit
There are insecure directories:
/usr/local/share/zsh/site-functions
/usr/local/share/zsh

chown -R "$(whoami)" /usr/local/share/zsh/site-functions /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions /usr/local/share/zsh


2023-03-16 fix error

Last login: Thu Mar 16 14:35:14 on ttys010
[9]    47765 illegal hardware instruction  sed --version 2>&1 | 
       47766 exit 1                        grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox} -q GNU

fixed by updating file `oh-my-zsh.sh`

omz update

preferred zsh themes

ZSH_THEME="random"                                                                         
# Set list of themes to pick from when loading at random                        
# Setting this variable when ZSH_THEME=random will cause zsh to load            
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/         
# If set to an empty array, this variable will have no effect.                  
ZSH_THEME_RANDOM_CANDIDATES=(rkj-repos cloud)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *