We will install zsh
, its expansion features and themes will be oh-my-zsh
provided by. Where Env.sh
files are used to maintain aliases (aliases), output (exports) and path changes (path changes), and so on, so as not to affect ~/.zshrc
.
1. Complete installation of zsh and zsh completions using Homebrew
Install zsh zsh-completions
2, install oh-my-zsh let zsh gain expand function and theme
Curl-l https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
3. Use a text editor or VI .zshrc
to open the following edits:
Zsh_theme=Pygmalion alias zshconfig="vi ~/.zshrc" alias Envconfig ="vi ~/projects/config/env.sh" plugins= (git colored-man colorize GitHub jira vagrant virtualenv pip python brew osx zsh-syntax-highlighting)
4. Use a text editor or VI ~/Projects/config/env.sh
to open the following edits:
#!/bin/zsh # Path export path="/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"Export EDITOR='vi-w'# Export PYTHONPATH=$PYTHONPATH # Export MANPATH="/usr/local/man: $MANPATH"# Virtual Environment Export Workon_home= $HOME/. Virtualenvs Export Project_home= $HOME/Projects Source/usr/local/bin/virtualenvwrapper.SH# Owner Export user_name="YOUR NAME"Eval"$ (rbenv init-)"# FileSearchfunctionF () {Find. -iname"*$1*"${@:2} } functionR () {grep " $"${@:2} -R.} #mkdirand CDfunctionMKCD () {mkdir-P"[email protected]"&& CD"$_"; } # Aliases alias Cppcompile='C + +-std=c++11-stdlib=libc++'
Note
If you add a new environment variable or modify the value of an environment variable, you need a source to take effect immediately.
If you delete an environment variable, you must enter exit to logout the current shell, and then reopen a new shell and login to take effect.
Mac installation Zsh Oh-my-zsh