mac添加oh my zsh
2024-10-21 03:55:42
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
最新文章
- uva133 救济金发放
- CSS清浮动
- SharePoint2013的头像显示和读取
- org.eclipse.ui.menus扩展点学习
- lsof -ntP -i:端口取出 动行程序的PID 然后xargs kill -9 这个进程
- Spring加载resource时classpath*:与classpath:的区别
- C++学习16 继承时的名字遮蔽
- 着色Test
- JavaScript 语言基础知识点总结(思维导图)
- Grub启动配置文件
- php中session 入库的实现
- java 虚拟机--新生代与老年代GC [转]
- Centos 7 django环境搭建
- 『骑士精神 IDA*』
- float浮动-清浮动BFC渲染机制
- linux指令(1)
- InnoDB 存储引擎的特点及优化方法
- springboot本地读取resources/images没问题,上传到云服务器打成jar包就读取不到问题
- MySQL 5.7 修改root密码
- react config test env with jest and create-react-app 1
热门文章
- Mysql中的Date转换
- thinkphp3.2源码(错误和异常处理)
- cat命令创建文件
- elementui---日期格式的选择
- .net程序反编译工具(ILSpy)
- libmysqlclient.so.18 not found 的解决方法
- 解决EasyDSS、EasyNVR流媒体RTMP、HLS(m3u8)、HTTP-FLV播放提示H5播放错误的问题
- WPF外包团队:2019 WPF数据监控系统案例演示
- idea创建maven web项目需要注意的一些细节
- Inno Setup 检测已安装的.NET Framework 版本