zsh配置

安装

  1. 安装zsh

    sudo apt-get install zsh
    

    或者已经安装了,查看/usr/bin/zsh

  2. 安装oh-my-zsh

    sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
    

主题

默认的robbyrussell主题就已经很不错啦。 agnoster也还行,就是字符显示有时有问题。修改后, 生效:

source ~/.zshrc

插件

  1. zsh-syntax-highlighting

    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    

    Ref:

  2. zsh-completions

    git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
    

    Ref:

  3. zsh-autosuggestions

    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    

    Ref:

  4. zsh-history-substring-search

    git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
    

    Ref:

记得要在~/.zshrc更新: (如果没有.zshrc这个文件, 运行一下zsh即可)

plugins=(git git-extras yarn zsh-completions zsh-syntax-highlighting zsh-autosuggestions zsh-history-substring-search)
autoload -U compinit && compinit

然后执行生效:

source ~/.zshrc
Copyright © Xintao all right reserved,powered by Gitbook修改时间: 2021-10-28 00:50:45

results matching ""

    No results matching ""