[Introduction] : ZSH enhancement tool, has a large number of themes, out of the box.

Introduction to the

Oh My Zsh is an open source, community-active Zsh enhancement tool for managing Zsh configuration, with hundreds of powerful plugins and beautiful themes, right out of the box. Using OhMyZsh will make your terminal look cool and will dramatically improve your command line efficiency.

Project address is:

https://github.com/ohmyzsh/oh…

Download and install

precondition

  • Unix-like operating systems such as MacOS, Linux, BSD; If you’re on Windows, you’ll need WSL2, but it’s best to install Cygwin or MSYS as well
  • You should have ZSH on your system first, preferably 5.0.8 or later
  • The curl or wget
  • Git, V2.4.11 or higher is recommended

Basic installation

Use curl, wget, or a similar tool to install from the command line.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

update

By default, the user is prompted to upgrade every few weeks. If you want to upgrade automatically without prompting, modify the ~/.zshrc file:

DISABLE_UPDATE_PROMPT=true

To disable automatic escalation, modify the ~/.zshrc file:

DISABLE_AUTO_UPDATE=true

uninstall

Simply execute uninstall_oh_my_zsh on the command line to remove and restore the bash or ZSH configuration on your own.

Use Oh My Zsh

The plug-in

Oh My Zsh comes with a large number of plugins, you can use directly, detailed reference to the official website.

  • To enable the plugin

Modify the configuration.zshrc file to enable the plug-in. The ZSHRC file can be found in the $HOME directory. Open it with a text editor, which lists all the places you want to load plug-ins.

plugins=(
  git
  bundler
  dotenv
  osx
  rake
  rbenv
  ruby
)

Note that the plug-in is configured by Spaces (Spaces, tabs, new lines…) Separate, do not use commas. Each plug-in comes with a README file that describes in detail how to use it.

The theme

According to the authors, there was a strong focus on support for themes in the early days of Oh My Zsh, and it’s now bundled with more than 150 themes. Take a look at a few.

Robby Russell (default theme) :

Afowler:

Geoffgarside:

Mikeh:

Choose a topic

Select your favorite theme, edit the ~/.zshrc file, and modify the environment variables in the theme:

ZSH_THEME="robbyrussell"

To use a different theme, just modify the environment variable:

ZSH_THEME = "agnoster" # (this is one of the fancy ones) # reference https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#agnoster

You can set a random theme and select it randomly each time you open a new terminal window:

ZSH_THEME="random"

You can set a random list of topics and select one randomly from this list:

ZSH_THEME_RANDOM_CANDIDATES=(
  "robbyrussell"
  "agnoster"
)

If you only want to disable certain topics, just add them as Ignore:

ZSH_THEME_RANDOM_IGNORED=(pygmalion tjkirch_mod)

Open source outpostDaily sharing of popular, interesting and useful open source projects. Participated in the maintenance of 100,000 + STAR open source technology resource library, including: Python, Java, C/C++, Go, JS, CSS, Node.js, PHP,.NET, etc.