Skip to content

Instantly share code, notes, and snippets.

@n1snt
Last active March 11, 2026 18:24
Show Gist options
  • Select an option

  • Save n1snt/2cccc8aa5f7b645a7628d3512c70deb6 to your computer and use it in GitHub Desktop.

Select an option

Save n1snt/2cccc8aa5f7b645a7628d3512c70deb6 to your computer and use it in GitHub Desktop.
Oh my ZSH 2026 updated setup guide

Oh my zsh Setup (Fast + Minimal)

Oh My Zsh

Install Zsh

Ubuntu

sudo apt update
sudo apt install zsh curl git

Set Zsh as default shell:

chsh -s $(which zsh)

Restart your terminal.


Install Zinit (Plugin Manager)

Zinit is used as a fast and lightweight plugin manager that loads Zsh plugins asynchronously to significantly reduce shell startup time.

bash -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"

Install Starship Prompt

Starship is used as a fast, cross-shell prompt that provides a minimal, customizable, and performant terminal prompt.

Ubuntu

curl -sS https://starship.rs/install.sh | sh

macOS

brew install starship

Configure .zshrc

Open .zshrc.

nvim ~/.zshrc

Replace contents with:

# Zinit
export ZINIT_HOME="$HOME/.local/share/zinit/zinit.git"
source $ZINIT_HOME/zinit.zsh

# Starship prompt
eval "$(starship init zsh)"
export STARSHIP_LOG=error

# Autocomplete settings
zstyle ':autocomplete:*' verbose no

# Must load first
zinit light marlonrichert/zsh-autocomplete

# Async plugins
zinit ice wait lucid
zinit light zsh-users/zsh-autosuggestions

zinit ice wait lucid
zinit light zsh-users/zsh-syntax-highlighting

# History
HISTSIZE=2000
SAVEHIST=2000
setopt HIST_IGNORE_ALL_DUPS
setopt SHARE_HISTORY

# Lazy NVM
export NVM_DIR="$HOME/.nvm"

load-nvm() {
  unset -f node npm npx nvm
  source "$NVM_DIR/nvm.sh"
}

for cmd in node npm npx nvm; do
  eval "$cmd() { load-nvm; $cmd \"\$@\" }"
done

# Completion cache
autoload -Uz compinit
compinit -C

# Compile zshrc
if [[ ! -f ~/.zshrc.zwc || ~/.zshrc -nt ~/.zshrc.zwc ]]; then
  zcompile ~/.zshrc
fi

Open starship.toml.

nvim ~/.config/starship.toml

Replace contents with:

# No blank line before prompt
add_newline = false

# Simple prompt layout
format = """
$directory\
$git_branch\
$git_status\
$character
"""

# Directory
[directory]
style = "cyan blue"
truncation_length = 3
truncate_to_repo = true

# Git status (very minimal)
[git_status]
style = "red"
format = '[$all_status$ahead_behind]($style) '

# Prompt symbol
[character]
success_symbol = "[❯](green)"
error_symbol = "[❯](red)"

# Disable the package module, hiding it from the prompt completely
[package]
disabled = true

[nodejs]
disabled = true

[aws]
disabled = true

[gcloud]
disabled = true

[battery]
disabled = true

[time]
disabled = true

Reload shell:

source ~/.zshrc

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment