Skip to content

Better Terminal Experience - Oh-My-Zsh + Bira Theme + Autosuggestions

This is a short guide for better terminal experience for macOS/Linux using Oh-My-Zsh, Bira Theme, Autosuggestions and Highlight plugins.

MacOS Installation with iTerm2 and Homebrew

terminal screenshot

First of all we need to install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This will install all the necessary requirements:

brew tap homebrew/cask-fonts
brew install zsh-autosuggestions zsh-syntax-highlighting git wget zsh iterm2 font-fira-code-nerd-font 

Install Oh-My-Zsh

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

~/.zshrc Config Modifications for MacOS

Theme:

ZSH_THEME="bira"

Plugins

plugins=(git colored-man-pages docker docker-compose iterm2 node npm brew pip colorize macos pyenv colorize adb aws)

Add this to the the end of ~/.zshrc

# Shell Integration and plugins
source "${HOME}/.iterm2_shell_integration.zsh"

if [ $(arch) = "i386" ]; then
  source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
fi

if [ $(arch) = "arm64" ]; then
  source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
fi
# Fix for Slow zsh-autosuggestions copy&paste
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
zstyle ':bracketed-paste-magic' active-widgets '.self-*'

Linux Installation

Requirements:

  • git
  • zsh
  • wget

The example below uses apt package manager (change to your package manager accordingly)

Install the Requirements

apt install -y git zsh wget

Install Oh-My-Zsh

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

Install Autosuggestions, Syntax-Highlighting Plugins

git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting

~/.zshrc Auto Config Modifications

Auto:

wget https://3os.org/assets/zshrc_config
mv zshrc_config ~/.zshrc

~/.zshrc Manual Config Modifications

Manual:

Theme:

ZSH_THEME="bira"

Plugins

plugins=(git colored-man-pages docker docker-compose iterm2 node npm brew pip colorize macos pyenv colorize adb aws)

Add this to the the end of ~/.zshrc

## Shell Integration and plugins
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
## Fix for Slow zsh-autosuggestions copy&paste
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
zstyle ':bracketed-paste-magic' active-widgets '.self-*'

Last update: November 8, 2021
Back to top