mac 终端配置 oh-my-zsh以及相关插件
oh-my-zsh
安装
sh -c "$(curl -fsSL https://install.ohmyz.sh/)"
# 修改默认主题为 ys, 文件位置 ~/.zshrc
ZSH_THEME="ys"
color 主题 dracula
下载 zip 文件后解压,再上传即可
修改主机名
http://47.97.44.29:8000/mac-%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d/
sudo scutil --set HostName you-want-to-set
终端插件
命令自动补全-zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
编辑 ~/.zshrc
plugins=(git zsh-autosuggestions)
重新加载
source ~/.zshrc
命令高亮-zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
编辑 ~/.zshrc
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
重新加载
source ~/.zshrc
目录跳转-zoxide
# 安装 rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cargo install zoxide --locked
追加一行到 ~/.zshrc 末尾
eval "$(zoxide init zsh)"
重新加载
source ~/.zshrc