zoukankan      html  css  js  c++  java
  • 配置Mac漂亮的Shell--Iterm2+OhMyZSH+Agnoster

    安装包管理器


    首先当然是解决包管理的问题,Mac下面是Homebrew的天下了

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    安装iterm2


    brew cask install iterm2
    

    安装字符集

    链接地址https://gist.githubusercontent.com/qrush/1595572/raw/417a3fa36e35ca91d6d23ac961071094c26e5fad/Menlo-Powerline.otf
    下载后图形化安装,没啥难点,安装好后修改下iterm2的字体

    iterm2 配色调整


    选择Solarized Dark

    以上都没有啥问题


    这些都是一条命令的事,没啥error可以修补的,一般不会出错哦。

    安装ohmyzsh


    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"  #curl安装
    sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"   #wget安装
    https://github.com/robbyrussell/oh-my-zsh  #github的连接
    

    安装成功后,用vim打开隐藏文件 .zshrc ,修改主题为 agnoster:

    ZSH_THEME="agnoster"
    

    如果上面有问题,在安装字体后


    cd ~/.oh-my-zsh/
    git checkout d6a36b1 agnoster.zsh-theme
    

    安装高亮和自动补全


    git clone git://github.com/zsh-users/zsh-syntax-highlighting.git  ~/
    git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
    或者使用incr也可以
    

    修改.zshrc


    plugins=(zsh-syntax-highlighting)
    source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
    source ~/.oh-my-zsh/plugins/incr/incr*.zsh
    

    然后重新引导.zshrc配置文件

    source ~/.zshrc
    

    然后重启iterm2,效果如下

  • 相关阅读:
    Ubuntu18.04 Redis主从复制
    解决:git push error: failed to push some refs to
    手把手安装Laravel框架(permissions扩展包)实现RBAC权限---以及一些安装时的ERROR
    linux-Navicat 连接数据库 报错10060 & Navicat连接报错1146
    composer PHP Fatal error致命错误
    Yii框架基础增删查改
    cookie和session的区别
    mysql的索引优化
    什么是B+Tree
    螺旋矩阵
  • 原文地址:https://www.cnblogs.com/KevinGeorge/p/9145784.html
Copyright © 2011-2022 走看看