Oh My Zsh is an open source, community-driven framework for managing your zsh configuration.

Sounds boring. Let’s try again.

Oh My Zsh will not make you a 10x developer…but you may feel like one.

Once installed, your terminal shell will become the talk of the town or your money back! With each keystroke in your command prompt, you’ll take advantage of the hundreds of powerful plugins and beautiful themes. Strangers will come up to you in cafés and ask you, “that is amazing! are you some sort of genius?”

Finally, you’ll begin to get the sort of attention that you have always felt you deserved. …or maybe you’ll use the time that you’re saving to start flossing more often. grimacing

To learn more, visit ohmyz.sh, follow @ohmyzsh on Twitter, and/or join us on Discord.

CI Follow @ohmyzsh Discord server

Getting Started
Prerequisites
A Unix-like operating system: macOS, Linux, BSD. On Windows: WSL2 is preferred, but cygwin or msys also mostly work.
Zsh should be installed (v4.3.9 or more recent is fine but we prefer 5.0.8 and newer). If not pre-installed (run zsh --version to confirm), check the following wiki instructions here: Installing ZSH
curl or wget should be installed
git should be installed (recommended v2.4.11 or higher)
Basic Installation
Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl or wget, whichever is installed on your machine.

via curl
sh -c “(curl−fsSLhttps://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"viawgetsh−c"(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" via wget sh -c "(curl−fsSLhttps://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"viawgetsh−c"(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
via fetch
sh -c “$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
Manual inspection
It’s a good idea to inspect the install script from projects you don’t yet know. You can do that by downloading the install script first, looking through it so everything looks normal, then running it:

curl -Lo install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
sh install.sh
Using Oh My Zsh
Plugins
Oh My Zsh comes with a shitload of plugins for you to take advantage of. You can take a look in the plugins directory and/or the wiki to see what’s currently available.

Enabling Plugins
Once you spot a plugin (or several) that you’d like to use with Oh My Zsh, you’ll need to enable them in the .zshrc file. You’ll find the zshrc file in your $HOME directory. Open it with your favorite text editor and you’ll see a spot to list all the plugins you want to load.

vi ~/.zshrc
For example, this might begin to look like this:

plugins=(
git
bundler
dotenv
osx
rake
rbenv
ruby
)
Note that the plugins are separated by whitespace (spaces, tabs, new lines…). Do not use commas between them or it will break.

Using Plugins
Each plugin includes a README, documenting it. This README should show the aliases (if the plugin adds any) and extra goodies that are included in that particular plugin.

Themes
We’ll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme happy. We have over one hundred and fifty themes now bundled. Most of them have screenshots on the wiki (We are working on updating this!). Check them out!

Selecting a Theme
Robby’s theme is the default one. It’s not the fanciest one. It’s not the simplest one. It’s just the right one (for him).

Once you find a theme that you’d like to use, you will need to edit the ~/.zshrc file. You’ll see an environment variable (all caps) in there that looks like:

ZSH_THEME=“robbyrussell”
To use a different theme, simply change the value to match the name of your desired theme. For example:

ZSH_THEME=“agnoster” # (this is one of the fancy ones)

see https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#agnoster

Note: many themes require installing the Powerline Fonts in order to render properly.

Open up a new terminal window and your prompt should look something like this:

Agnoster theme

In case you did not find a suitable theme for your needs, please have a look at the wiki for more of them.

If you’re feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.

ZSH_THEME=“random” # (…please let it be pie… please be some pie…)
And if you want to pick random theme from a list of your favorite themes:

ZSH_THEME_RANDOM_CANDIDATES=(
“robbyrussell”
“agnoster”
)
If you only know which themes you don’t like, you can add them similarly to a blacklist:

ZSH_THEME_RANDOM_BLACKLIST=(pygmalion tjkirch_mod)
FAQ
If you have some more questions or issues, you might find a solution in our FAQ.

Advanced Topics
If you’re the type that likes to get their hands dirty, these sections might resonate.

Advanced Installation
Some users may want to manually install Oh My Zsh, or change the default path or other settings that the installer accepts (these settings are also documented at the top of the install script).

Custom Directory
The default location is ~/.oh-my-zsh (hidden in your home directory, you can access it with cd ~/.oh-my-zsh)

If you’d like to change the install directory with the ZSH environment variable, either by running export ZSH=/your/path before installing, or by setting it before the end of the install pipeline like this:

ZSH="$HOME/.dotfiles/oh-my-zsh" sh install.sh
Unattended install
If you’re running the Oh My Zsh install script as part of an automated install, you can pass the flag --unattended to the install.sh script. This will have the effect of not trying to change the default shell, and also won’t run zsh when the installation has finished.

sh -c “$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)” “” --unattended
Installing from a forked repository
The install script also accepts these variables to allow installation of a different repository:

REPO (default: ohmyzsh/ohmyzsh): this takes the form of owner/repository. If you set this variable, the installer will look for a repository at https://github.com/{owner}/{repository}.

REMOTE (default: https://github.com/${REPO}.git): this is the full URL of the git repository clone. You can use this setting if you want to install from a fork that is not on GitHub (GitLab, Bitbucket…) or if you want to clone with SSH instead of HTTPS (git@github.com:user/project.git).

NOTE: it’s incompatible with setting the REPO variable. This setting will take precedence.

BRANCH (default: master): you can use this setting if you want to change the default branch to be checked out when cloning the repository. This might be useful for testing a Pull Request, or if you want to use a branch other than master.

For example:

REPO=apjanke/oh-my-zsh BRANCH=edge sh install.sh
Manual Installation

  1. Clone the repository:
    git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
  2. Optionally, backup your existing ~/.zshrc file:
    cp ~/.zshrc ~/.zshrc.orig
  3. Create a new zsh configuration file
    You can create a new zsh config file by copying the template that we have included for you.

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
4. Change your default shell
chsh -s $(which zsh)
You must log out from your user session and log back in to see this change.

  1. Initialize your new zsh configuration
    Once you open up a new terminal window, it should load zsh with Oh My Zsh’s configuration.

Installation Problems
If you have any hiccups installing, here are a few common fixes.

You might need to modify your PATH in ~/.zshrc if you’re not able to find some commands after switching to oh-my-zsh.
If you installed manually or changed the install location, check the ZSH environment variable in ~/.zshrc.
Custom Plugins and Themes
If you want to override any of the default behaviors, just add a new file (ending in .zsh) in the custom/ directory.

If you have many functions that go well together, you can put them as a XYZ.plugin.zsh file in the custom/plugins/ directory and then enable this plugin.

If you would like to override the functionality of a plugin distributed with Oh My Zsh, create a plugin of the same name in the custom/plugins/ directory and it will be loaded instead of the one in plugins/.

Getting Updates
By default, you will be prompted to check for upgrades every few weeks. If you would like oh-my-zsh to automatically upgrade itself without prompting you, set the following in your ~/.zshrc:

DISABLE_UPDATE_PROMPT=true
To disable automatic upgrades, set the following in your ~/.zshrc:

DISABLE_AUTO_UPDATE=true
Manual Updates
If you’d like to upgrade at any point in time (maybe someone just released a new plugin and you don’t want to wait a week?) you just need to run:

omz update
Magic! tada

Uninstalling Oh My Zsh
Oh My Zsh isn’t for everyone. We’ll miss you, but we want to make this an easy breakup.

If you want to uninstall oh-my-zsh, just run uninstall_oh_my_zsh from the command-line. It will remove itself and revert your previous bash or zsh configuration.

How do I contribute to Oh My Zsh?
Before you participate in our delightful community, please read the code of conduct.

I’m far from being a Zsh expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don’t hesitate to fork and send pull requests!

We also need people to test out pull-requests. So take a look through the open issues and help where you can.

See Contributing for more details.

Do NOT send us themes
We have (more than) enough themes for the time being. Please add your theme to the external themes wiki page.

Contributors
Oh My Zsh has a vibrant community of happy users and delightful contributors. Without all the time and help from our contributors, it wouldn’t be so awesome.

Thank you so much!

Follow Us
We’re on the social media.

@ohmyzsh on Twitter. You should follow it.
FaceBook poke us.
Instagram tag us in your post showing Oh My Zsh!
Discord to chat with us!
Merchandise
We have stickers, shirts, and coffee mugs available for you to show off your love of Oh My Zsh. Again, you will become the talk of the town!

License

ohmyzsh/ohmyzsh相关推荐

  1. fatal: unable to access ‘https://github.com/ohmyzsh/ohmyzsh.git/‘:

    今天发现ohmyzsh更新失败了,我特地找了一下原因,下面是更新失败的日志: [oh-my-zsh] Would you like to update? [Y/n] Y Updating Oh My ...

  2. 内网使用ohmyzsh

    一.到github上下载ohmyzsh包 如果有同学不知道怎么科学上网,那就到国内的镜像上去下或者clone都可以,下载完了,压缩一下,拷到内网里,内外网总有文件传输的方式,内网最让人烦恼的还是不能连 ...

  3. Oh-My-Zsh 操作 Git 的快捷键

    本篇文章介绍 Oh-My-Zsh 安装,以及 git 快捷键.也许你已经烦透了每天 git add . git commit -m 'some fix' git push... 如果操作变成这样 ga ...

  4. linux shell zsh,Linux终极shell Z Shell 用强大的zsh oh-my-zsh把Bash换掉

    Bash确实是不错的Shell,但仍有用不少不尽人意的地方,如自动补全的功能不够强大,定位较长路径不够方便,命令历史管理不够完善等.javascript 介绍使用zsh,功能十分强大-推荐给你们!ja ...

  5. 使用 ohmyzsh 打造 windows、ubuntu、mac 系统高效终端命令行工具

    如果觉得内容不错,可以设为星标置顶我的公众号 原标题名:oh my zsh 和 windows git bash 设置别名提高效率 写于2018年06月03日 在我的微信交流群中听闻很多前端开发比较贫 ...

  6. Oh-My-Zsh 中安装 NVM

    1.安装命令 sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ...

  7. Mac国内安装oh-my-zsh

    git@github.com:ohmyzsh/ohmyzsh.git cd ohmyzsh/tools/ sh install.sh 结果截图:

  8. manjaro配置zsh和oh-my-zsh

    追求美观的人一定不会错过一个漂亮的命令行(苹果本的终端也能用这个插件). 查看现有shell cat /etc/shells 查看默认shell echo $SHELL 修改默认终端为zsh(manj ...

  9. zsh 及 oh-my-zsh 使用

    zsh介绍 zsh 是一款功能强大的 shell 软件,它可以兼容 bash,并且提供了很多高效的改进.它是Linux里最庞大的一种shell,它有84个内部命令,也提供了更为强大的功能: 1.更好的 ...

最新文章

  1. 新的小游戏发布啦。Pop Jungle
  2. TensorFlow下的基础命令语句:数组、字典、判断、循环、与函数
  3. hive查询where join_Hive系列(4):常用函数where,join
  4. python用input输入列表有缺陷_Python 三程三器的那些事
  5. entity framework5 sqlserver2005 事务(TransactionScope)报未启用MSDTC错误解决办法
  6. 控制dcom程序使用端口_使用VS Code调试.net控制台应用程序的方法
  7. YUI事件体系之Y.EventTarget
  8. linux 字符设备驱动cdev
  9. 5个数中取三个数组合 不重复 php,PHP产生不重复随机数的5个方法总结
  10. Oracle11g最佳培训高清下载版(王二暖Oracle11g教室\10年经验毫无保留)
  11. python调用文件可以干嘛_Python完成读取并保存文件类的详细介绍
  12. c语言图像对比度增强,图像对比度增强实验分析报告.doc
  13. Mac苹果电脑上右键创建文件
  14. 引用 八卦象数疗法--配方2
  15. 两年数据对比柱形图_呕心整理4大类12个图表类型,轻松搞定数据可视化
  16. 轻量级图片批量上传JS插件 imgFileupload.js
  17. 如何通过js关闭微信浏览器页面
  18. Luat 功能开发教程(十六) LittleVGL
  19. Zabbix如何配置告警短信?
  20. Android进阶——巧借自定义VideoView实现Activity的动态视频背景

热门文章

  1. 学软件开发前景好吗?
  2. html 穿越星空效果,CANVAS 光速穿越星空的效果
  3. cocosCreator JS 开发 之 预制资源使用Prefab
  4. 判断一个链表是否为回文结构
  5. 异常检测的N种方法,这次全都盘出来了
  6. CS231n Spring 2019作业
  7. 什么是API接口,具体是什么意思?
  8. 普通排水与实验室给排水的区别TENAISU
  9. 应对IP被封--抓取西刺代理,并构建自己的代理池
  10. 找工作、备考、面试刷题网站推荐(牛客网、力扣、计蒜客、hihocoder、七月在线)以及acm竞赛oj