mac添加oh my zsh
Mac 终端 oh-my-zsh 配置
Mac 终端默认 shell 为 bash。
zsh 可能是目前最好的 shell ,至于好在哪里可自行百度。
本文主要介绍使用 zsh 以及 oh-my-zsh 的配置。
使用 zsh
查看当前使用的 shell
echo $SHELL
/bin/bash
查看安装的 shell
cat /etc/shells
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
使用 brew 更新 zsh
brew install zsh
==> Downloading https://homebrew.bintray.com/bottles/zsh-5.5.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring zsh-5.5.1.high_sierra.bottle.tar.gz
/usr/local/Cellar/zsh/5.5.1: 1,444 files, 12MB
切换为 zsh
chsh -s /bin/zsh
重启终端即可使用 zsh
oh-my-zsh
安装
执行从 oh-my-zsh 的 GitHub 下载的安装脚本
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/ ....is now installed!
Please look over the ~/.zshrc file to select plugins, themes, and options.
p.s. Follow us at https://twitter.com/ohmyzsh.
p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.
主题
打开 oh-my-zsh 配置文件
vim ~/.zshrc

配置项 ZSH_THEME 即为 oh-my-zsh 的主题配置,oh-my-zsh 的 GitHub Wiki 页面提供了 主题列表
当设置为 ZSH_THEME=random 时,每次打开终端都会使用一种随机的主题。
更新配置
source ~/.zshrc
自动补全插件
下载 incr 自动补全插件 http://mimosa-pudica.net/src/incr-0.2.zsh
将插件放在 oh-my-zsh 自定义插件目录中

打开 oh-my-zsh 配置文件
vim ~/.zshrc

在 plugins 中添加 incr
在配置文件结束添加:
source $ZSH/custom/plugins/incr/incr*.zsh
更新配置
source ~/.zshrc
最终效果如官网所示:

Homebrew:
https://brew.sh/index_zh-cn
https://github.com/Homebrew/brew
oh-my-zsh:
https://ohmyz.sh/
https://github.com/robbyrussell/oh-my-zsh
incr:
http://mimosa-pudica.net/zsh-incremental.html
mac添加oh my zsh的更多相关文章
- 转载:(Mac)在bash和zsh配置环境变量path的几种方法
参考文献 老习惯,列出本文参考或引用或转载的文档和博客,致以崇高的敬意,感兴趣的可以去看看 1.http://postgresapp.com/ 2.http://postgresapp.com/doc ...
- iOS mac添加证书 不能修改“System Roots”钥匙串错误
iOS mac添加证书 不能修改“System Roots”钥匙串错误 如图: 解决方式: 打开钥匙串---登录---,直接把证书拖过来 然后,查看--我的证书,里面,找到证书,即可
- Mac 小记 — iTerm2、Zsh、Homebrew
前言 写完 "Ubuntu 自动化配置" 这篇文章后,每次连服务器心情指数都上升好几个百分点,于是想着应该将 macOs 的开发环境也梳理梳理,应该会对开发效率有所增益. 1. i ...
- mac 添加安卓设备的支持
1. 把android设备插到mac电脑上 2. 首先可以看一下之前在该mac电脑上有没有添加过这个 , 命令 : adb devices 如果显示出,下面字样,说明之前添加过了,下面就可以 ...
- 【转】Mac OS X 中 Zsh 下 PATH 环境变量的正确设置
在 Mac OS X 中使用 zsh,环境变量 PATH 一不小心就会变得很紊乱,表现为自己设置的路径总是被放到系统路径之后,部分路径还会有重复.这是我们不太了解 zsh 启动时加载文件的顺序和 Ma ...
- mac 添加环境变量(jmeter添加至环境变量中)
Mac系统的环境变量,加载顺序为:a. /etc/profileb. /etc/pathsc. ~/.bash_profiled. ~/.bash_logine. ~/.profilef. ~/.ba ...
- Mac添加命令别名
1. 切换到用户主目录 $ cd 2. 编辑或新建.bash_profile文件 3. 添加别名 命令别名设置语法: alias [别名]='[指令名称]' 注意:等号两边均无空格,指令名称中如有空格 ...
- mac 添加环境变量
1.Mac系统的环境变量,加载顺序为: a. /etc/profile b. /etc/paths c. ~/.bash_profile d. ~/.bash_login e. ~/.profile ...
- Mac OSX:安装zsh
想在mac下安装oh my zsh,按照https://github.com/robbyrussell/oh-my-zsh上的文档,执行下面这条命令安装:curl -L http://install. ...
随机推荐
- jmeter元件作用及执行顺序
jmeter是一个开源的性能测试工具,它可以通过鼠标拖拽来随意改变元件之间的顺序以及元件的父子关系,那么随着它们的顺序和所在的域不同,它们在执行的时候,也会有很多不同. jmeter的test pla ...
- (7)Flask微电影之会员中心页面搭建
一.添加会员中心页面的路由 修改app/home/views.py内容,追加会员有关的5个路由: # coding:utf8 from . import home from flask import ...
- linux升级python到2.7版本
linux的python安装包默认版本是2.6.6,yum程序默认也是依赖这个版本的python包的,但是其他一些程序如nodejs,却要的是2.7版本,因此必须要考虑升级后与yum的兼容问题.两步走 ...
- 位运算在 PHP 实际项目当中的高级运用
我们首先来看一个系统中常见的需求: 有一个广告表,我们要对广告做显示控制: 手动上下线. 只允许 VIP 查看. 可能的表结构如下: CREATE TABLE `finger_ad` ( `ad_id ...
- [LeetCode] 341. Flatten Nested List Iterator 压平嵌套链表迭代器
Given a nested list of integers, implement an iterator to flatten it. Each element is either an inte ...
- Consul服务告警之Watch机制
熔断保护在Consul和Ocelot中都有实现,意思就是当一个服务不正常时(比如我们的一个服务实例挂了,Consul的健康检查机制检测到了),应该给系统维护人员给以告警.在Consul中,服务告警也是 ...
- 在webstorm里使用git
1,设置git 打开webstorm软件,找到file下面的settings(设置) 打开设置对话窗,找到version control的子级目录git,路径path输入git安装目录下bin目录里的 ...
- ply2obj
""" Simple script to convert ply to obj models """ import os from argp ...
- PHP设计模式 - 建造者模式
建造者模式主要在于创建一些复杂的对象.将一个复杂对象的构造与它的表示分离,使同样的构建过程可以创建不同的表示的设计模式; 结构图: <?php /** * * 产品本身 */ class Pro ...
- Windows中使用 Python 调用 Matlab 程序
https://ww2.mathworks.cn/help/matlab/matlab_external/system-and-configuration-requirements.html http ...