zsh

Zsh is a Unix shell based on the Bourne shell, like bash.

Installation

Use homebrew to install Zsh:

$ brew install zsh

To set it as your default shell:

$ sudo sh -c "echo $(which zsh) >> /etc/shells" && chsh -s $(which zsh)

Shortcuts

These shortcuts work in Bash as well.

Keystroke Description
Ctrl + A / Ctrl + E Go to start/end of line
Ctrl + W Delete previous word
Ctrl + U / Ctrl + K Remove everything from cursor to beginning/end of the line
Ctrl + X + E Open a temporary file in $EDITOR that will be executed on close

Oh My Zsh

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

Installation

To install, use this:

$ curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

Plugins

Plugins are installed using Oh My Zsh and the ~/.zshrc file.

Preinstalled

Profile

Your profile, which includes your different environment variables, can be found at .zprofile.

References

  1. https://gist.github.com/derhuerst/12a1558a4b408b3b2b6e#file-mac-md
  2. https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh
  3. https://www.sitepoint.com/zsh-commands-plugins-aliases-tools/
Incoming Links

Last modified: 202401040446