一个简易的安装 Zsh Oh-my-zsh(including plugs)Fastfetch 的教程
[toc]
安装 Zsh
1 | brew install zsh |
安装 Oh-my-zsh
1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
应该将zsh
自动设为你的默认 shell 了,如果没有,可以手动输入:
1 | chsh -s $(which zsh) |
安装插件
zsh-syntax-highlighting
1 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting |
zsh-autosuggestions
1 | git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions |
配置 Zsh 的配置文件
1 | vim ~/.zshrc |
打开zsh
的配置文件,将plugin
添加到你的.zshrc
1 | plugins=(git zsh-syntax-highlighting zsh-autosuggestions) |
选择 Themes
(optional)
1 | ZSH_THEME=robbyrussell |
默认的主题就是 robbyrussell,具体可见Themes · ohmyzsh/ohmyzsh Wiki (github.com)
安装 Fastfetch
fastfetch-cli/fastfetch (github.com)
1 | brew install fastfetch |
生成配置文件
1 | fastfetch --gen-config |
1 | vim ~/.config/fastfetch/config.jsonc |
以下是我的配置文件
1 | { |
每次打开自动运行
1 | vim ~/.zshrc |
在最底处输入
1 | fastfetch |
为 iterm2 配置代理
1 | code ~/.zshrc |
新增
1 | alias proxy='export http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890' |