linux_mac_centos_ubuntuインストールzsh

0zshとoh-my-zshをインストールします

# 查看当前shell
echo $SHELL


# 安装zsh
## centos
sudo yum install zsh
## ubuntu
sudo apt install zsh

# 查看zsh
which zsh

# 更换sh
# chsh -s /usr/bin/zsh
chsh -s /bin/zsh

# clone from github
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# 复制默认.zshrc
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

1構文強調表示プラグイン

  1. インストール
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. 構成
    〜/ .zshrcのプラグインにzsh-syntax-highlightingを追加します

2オートコンプリートプラグイン

  1. インストール
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
  1. 構成
    〜/ .zshrcのプラグインにzsh-autosuggestionsを追加します

参照

CentOSはoh-my-zshをインストールし、構文の強調表示とコマンドのオートコンプリートを構成します

おすすめ

転載: blog.csdn.net/sdlypyzq/article/details/112865662