zsh安装与使用

oh-my-zsh

ZSH

  1. 安装 zsh
    apt install zsh
    
  2. 下载oh-my-zsh
    # curl
    sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    #wget
    sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
    

配置插件

# 终端提示
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
# 语法高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

环境变量配置

# 查看当前zsh系统自带了哪些主题
ls ~/.oh-my-zsh/themes
# 查看当前主题
echo $ZSH_THEME

vim ~/zshrc
# 设置为随机主题
# ZSH_THEME="ys"
ZSH_THEME="powerlevel10k"
# 设置为随机主题后,刷到了喜欢的主题,可通过以下命令查看当前主题:
echo $RANDOM_THEME
设置为在指定主题间切换


ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" "ys" "powerlevel10k" )
plugins=(
        git
        extract # 解压
        zsh-autosuggestions # 命令自动补全
        zsh-syntax-highlighting # 语法高亮
        )

'保存并退出'
source ~/.zshrc
上一篇:element ui自定义主题色


下一篇:Transfer KDE application styles to GTK applications