在 Mac OSX 上安装 Oh My Zsh

安装 Oh My Zsh

1、切换到 zsh
Mac OSX默认使用的是 bash shell,使用chsh -s /bin/zsh命令切换至 zsh
2、使用curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh进行安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
100 3952 100 3952 0 0 821 0 0:00:04 0:00:04 --:--:-- 4272
Cloning Oh My Zsh...
Cloning into '/Users/huangzishan/.oh-my-zsh'...
remote: Counting objects: 883, done.
remote: Compressing objects: 100% (746/746), done.
remote: Total 883 (delta 16), reused 784 (delta 10), pack-reused 0
Receiving objects: 100% (883/883), 585.10 KiB | 693.00 KiB/s, done.
Resolving deltas: 100% (16/16), done.
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc
Time to change your default shell to zsh!
Changing shell for huangzishan.
Password for huangzishan:
chsh: no changes made
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/ ....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 https://shop.planetargon.com.

配置 Oh My Zsh

1、使用vi ~/.zshrc打开配置文件
配置文件
2、在Oh My Zsh主题展示网站 ,选择喜欢的主题进行更改。这里使用的是 vim 来打开的配置文件,所以需要按字母 i 进行插入,然后把光标移动到 ZSH_THEME 这行,更改主题键值对,例如:ZSH_THEME=”agnoster” ,按 ESC 键后, 键入 :wq 保存退出。
3、关闭终端,重新打开,键入 ls,效果如下:
效果展示

Powered by Hexo and Hexo-theme-hiker

Copyright © 2013 - 2019 Acan's blog All Rights Reserved.

访客数 : | 访问量 :