Contents

OhMyZsh国内镜像安装及常用插件

Gitee ZSH Mirror

1. 安装ZSH

查看当前系统内安装的shells

cat /etc/shells

安装zsh及chsh命令工具

yum install -y zsh util-linux-user

可以利用yum provides chsh命令查看chsh这个命令是来自于哪个包。

2. 一行命令安装国内Gitee镜像版Oh My ZSH

sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh \
    | sed 's|^REPO=.*|REPO=${REPO:-mirrors/oh-my-zsh}|g' \
    | sed 's|^REMOTE=.*|REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}|g')"

常用插件(Plugin)

  1. 默认已经配置的git

  2. autojump的平替z,强大的目录跳转能力(可能出现的bug:跳转过程中出现🔲字符)

  3. zsh-autosuggestions,自动补全

    安装方法:

    git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
    
  4. extract 各种格式压缩包自动解压

  5. gitignore gi python >.gitignore生成各种语言的ignore文件

配置方法:

vim ~/.zshrc
plugin=(git z zsh-autosuggestions extract gitignore) #找到plugin段修改

参考:

  1. CSDN https://www.cnblogs.com/vertexz/p/15627745.html
  2. 知乎 https://www.zhihu.com/question/49284484/answer/617215298