配置方案要進行調整
- 安裝zsh[M1芯片],官網(wǎng)的需要鏈接官網(wǎng)才行,這個是本土的
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
成功后執(zhí)行source命令,就會將其添加到 .zshrc中
## 安裝 zsh-syntax-highlighting 不同發(fā)行版安裝位置不同修改路徑
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
## 安裝 zsh-autosuggestions 不同發(fā)行版安裝位置不同修改路徑
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 查看版本