shell 命令行搭建
📅 发表于 2025/06/09
🔄 更新于 2025/06/09
👁️ -- 次访问
📝 0 字
⏳ 0 分钟
shell
#oh-my-zsh
# 如果没有zsh,先安装一下zsh
brew install zsh
chsh -s $(which zsh)
# clone oh-my-zsh
git clone https://github.com/ohmyzsh/ohmyzsh.git
# 进入文件夹,并安装
./tools/install.sh一般内置在 ohmyzsh-plugin-wiki里面寻找即可,部分插件依赖前置安装,按照wiki说明即可。
plugins=(aliases git autojump conda pip tmux web-search vscode zsh-navigation-tools zsh-interactive-cd zsh-autosuggestions zsh-syntax-highlighting)
# 配置gnu-ls
zstyle ':omz:lib:theme-and-appearance' gnu-ls yes我的重点是autojump、zsh-autosuggestions、zsh-syntax-highlighting。这三个安装和配置有些许差异。
# autojump,官网没说要安装,直接配置就行了
# zsh-autosuggestions git安装,brew也可以吧,只需选中,无需额外配置,在plugins上写上名称即可
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 需要在.zshrc的末尾,进行source配置
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zshzsh-navigation-tools 这个插件慢慢琢磨一下。
# clone
git clone https://github.com/trapd00r/LS_COLORS.git
source ~/app/LS_COLORS/lscolors.sh
# 注意,需要在zshrc里配置,也就是使用gnu-ls,否则需要alias
zstyle ':omz:lib:theme-and-appearance' gnu-ls yes
# dracula 主题
git clone https://github.com/dracula/zsh.git
ln -s /Users/plm/app/zsh/dracula.zsh-theme $ZSH/themes/dracula.zsh-theme