配置方案要进行调整
- 安装zsh[M1芯片],官网的需要链接官网才行,这个是本土的
sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"
安装目标:1个主题,3个插件
- 主题使用:
ZSH_THEME="ys" => ZSH_THEME="robbyrussell"
插件: 自动补全
plugins=(git colored-man-pages colorize cp man command-not-found sudo ubuntu archlinux zsh-navigation-tools z extract history-substring-search python)
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
高亮安装:
arch -arm64 brew install zsh-syntax-highlighting
自动提示
arch -arm64 brew install zsh-autosuggestions
便捷目录跳转
arch -arm64 brew install autojump
成功后执行source命令,就会将其添加到 .zshrc中
## 安装 zsh-syntax-highlighting 不同发行版安装位置不同修改路径
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
## 安装 zsh-autosuggestions 不同发行版安装位置不同修改路径
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
记得最后要补充生效
source .zshrc
卸载zsh: uninstall_oh_my_zsh
升级 :
upgrade_oh_my_zsh
禁止自动更新:
在.zshrc中配置:
DISABLE_AUTO_UPDATE=true
// 使用deep1降低下载量
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
homeBrew安装
- 卸载原有homeBrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
- 安装新的homeBrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
- 生效配置
source /Users/<本机用户名>/.bash_profile
- 其他命令
brew -v 查看版本
网友评论