From ade2eaee162e5e6aa284c4e4701a2347755e8039 Mon Sep 17 00:00:00 2001 From: H Date: Sat, 28 Aug 2021 03:58:36 +0800 Subject: [PATCH] zsh --- zsh_config/README.md | 4 ++++ zsh_config/zsh_install.sh | 20 ++++++++++++++++++-- zsh_config/zshrc | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/zsh_config/README.md b/zsh_config/README.md index e69de29..3930f1a 100644 --- a/zsh_config/README.md +++ b/zsh_config/README.md @@ -0,0 +1,4 @@ +zsh config + + +安装zsh、 oh-my-zsh、zinit和zsh配置文件中的 brew 、fuck等 diff --git a/zsh_config/zsh_install.sh b/zsh_config/zsh_install.sh index 4af212f..4d2c512 100755 --- a/zsh_config/zsh_install.sh +++ b/zsh_config/zsh_install.sh @@ -1,16 +1,32 @@ + +## oh_my_zsh install if [ -d ~/.oh-my-zsh ];then echo "you have installed oh_my_zsh" else sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" fi -sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" -if [-f ~/.zshrc.old];then +## zinit install +if [ -d ~/.zinit ];then + echo "you have install zinit" +else + sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" +fi + +## backup old zshrc +if [ -f ~/.zshrc.old ];then echo "you have zshrc.old" else mv ~/.zshrc ~/.zshrc.old cp ./zshrc ~/.zshrc fi + +if [ -d /home/linuxbrew/ ];then + echo "you have install brew" +else + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +fi + source ~/.zshrc zinit update diff --git a/zsh_config/zshrc b/zsh_config/zshrc index 8d8b354..26045d0 100644 --- a/zsh_config/zshrc +++ b/zsh_config/zshrc @@ -167,7 +167,7 @@ alias googler='googler --proxy 127.0.0.1:8889' #autoload -U +X bashcompinit && bashcompinit #complete -o nospace -C /usr/local/bin/bit bit -eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)" +#eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)" ### Added by Zinit's installer if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then