美文网首页
linux和macOS安装oh my zsh

linux和macOS安装oh my zsh

作者: thepoy | 来源:发表于2020-07-22 23:32 被阅读0次
    效果图

    1、如果没有安装zsh的请先安装zsh

    debian系通常默认未安装zsh,arch系一般预装zsh。

    sudo apt install zsh
    

    如果arch系没有zsh,也安装一下:

    sudo pacman -S zsh
    

    macOS默认用的就是zsh,不需要再安装。

    2、使用官方脚本安装oh my zsh,下面两条命令任选其一

    curl

    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    

    wget

    sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    

    一路yes即可。

    3、安装历史命令提示插件

    git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
    

    4、安装高亮插件

    git clone git://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
    

    5、修改.zshrc

    在文件里找到plugins,修改为

    plugins=(
      git
      zsh-autosuggestions
      zsh-syntax-highlighting
    )
    

    6、生效配置

    source .zshrc
    

    相关文章

      网友评论

          本文标题:linux和macOS安装oh my zsh

          本文链接:https://www.haomeiwen.com/subject/powpohtx.html