Shell configuration – 2025 Edition
Like any other hacker, I’ve been procrastinating making progress on my main project by tinkering with my shell and prompt. The idea was to nuke everything and start afresh. I was running Zsh as my shell, Prezto as the configuration manager and the Spaceship prompt. Over time, I had focused on making the shell look pretty rather than be really fast/performant, and also I hadn’t made any big changes in a year or so, so I wanted to look around the reconfigure it from scratch.
I’m still sticking with zsh
as my shell. I have no problems with it (I’m not writing any mission critical shell scripts that might be executed in a different shell), and the community still seems very active and vibrant. I was also not explicitly aware that Macs ship with zsh
as the default shell now.
Instead of using any sort of configuration/plugin manager for zsh
, I’m moving to managing things myself. For the prompt, I’m experimenting with Starship prompt (rust-powered, which is interesting). Installing it is a breeze with homebrew
and loading it within zshrc
. I haven’t tweaked around with its default configuration much, but I did install (FireCode Nerd Font)[https://www.nerdfonts.com/font-downloads] to make the prompt look good.
For the zsh plugins, I’m sticking to only 3 to start out with: zsh-autosuggestions
(installed with homebrew), zsh-syntax-highlighting
(installed with homebrew) and zsh-nvm
(copied from Github, to avoid nvm loading performance penalty). Apart from these 3 plugins, I’m just using a few lines to get coloured output working with the shell and getting history lookups working fine.
I’ll stick with this configuration for a few days and report back.
My entire .zshrc
looks like this right now:
# Zsh improvements
export CLICOLOR=1
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search # Up
bindkey "^[[B" down-line-or-beginning-search # Down
# Make sure Homebrew (including installed packages) are on the path
export PATH="/opt/homebrew/bin:$PATH"
# Load up PyEnv
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - zsh)"
# Load up Node Version Manager
export NVM_LAZY_LOAD=true
source ~/.zsh-nvm/zsh-nvm.plugin.zsh
# Start starship rust prompt (supposed to be *fast*)
eval "$(starship init zsh)"
# Zsh plugins
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh