Mac 开发神器 oh-my-zsh 初体验

版权声明: https://blog.csdn.net/Dongguabai/article/details/89403549

应该是我 out 了,今天才知道这个东东。其实不应该叫 Mac 开发神器,叫 Terminal 神器才对,官网(https://ohmyz.sh/)这么说的:

Your terminal never felt this good before.

根据官方文档说明,在安装 oh-my-zsh 之前需要注意几个 prerequisites:

  • Unix-like operating system (macOS or Linux)
  • Zsh should be installed (v4.3.9 or more recent). If not pre-installed (zsh --version to confirm), check the following instruction here: Installing ZSH
  • curl or wget should be installed
  • git should be installed
Dongguabai:~ dongguabai$ zsh --version
zsh 5.3 (x86_64-apple-darwin18.0)
Dongguabai:~ dongguabai$ curl --version
curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy 

都准备好了的话就可以开始安装了:

  • via curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • via wget
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

我使用的第一种:

Dongguabai:~ dongguabai$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Cloning Oh My Zsh...
正克隆到 '/Users/dongguabai/.oh-my-zsh'...
remote: Enumerating objects: 1023, done.
remote: Counting objects: 100% (1023/1023), done.
remote: Compressing objects: 100% (940/940), done.
remote: Total 1023 (delta 23), reused 848 (delta 20), pack-reused 0
接收对象中: 100% (1023/1023), 680.62 KiB | 86.00 KiB/s, 完成.
处理 delta 中: 100% (23/23), 完成.
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 dongguabai.
Password for dongguabai: 
         __                                     __   
  ____  / /_     ____ ___  __  __   ____  _____/ /_  
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ 
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / 
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  
                        /____/                       ....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, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh

➜  ~ 

最常用的比如:
在这里插入图片描述
文件夹和文件的高亮区分显示。
在这里插入图片描述
可以使用 Tab 键去切换提示补全。

其实 oh-my-zsh 还有很多有意思的地方,比如可扩展的主题插件、字体插件等。可以让你的 Terminal 炫起来。


References:

欢迎关注公众号:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Dongguabai/article/details/89403549
今日推荐