zsh & oh-my-zsh

安装zsh & oh-my-zsh

sudo apt-get install zsh
zsh
zsh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

无法链接raw.github的话就改用

wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
chmod +x install.sh
./install.sh

如果卡死了,说明无法使用github的文件,改为gitee的就好啦

rm -r .oh-my-zsh
vim install.sh

找到如下部分

# Default settings
ZSH=${ZSH:-~/.oh-my-zsh}
REPO=${REPO:-ohmyzsh/ohmyzsh}
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
BRANCH=${BRANCH:-master}

更改中间的两行

REPO=${REPO:-mirrors/oh-my-zsh}
REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}

esc键,再输入:wq保存即可。再重新执行./install.sh即可

配置与安装

配置完毕之后记得使用 source .zshrc进行更新

配置文档

vi ~/.zshrc
#更改文件
ZSH_THEME="ys"
plugins=(
    git
    autojump
    z
    extract
    zsh-syntax-highlighting
    zsh-autosuggestions
    )
$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -k)"; 

安装插件

highlight

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

autosuggestions

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

autojump

sudo apt-get install autojump

更新方式

omz update
posted @ 2021-05-09 20:02  小康要好好学习  阅读(79)  评论(0编辑  收藏  举报