This document details the shell configuration used in this dotfiles setup, focusing primarily on the Fish shell with notes about the ZSH configuration for reference.
Fish is the primary shell used in this setup. The configuration provides a fast, modern shell experience with powerful features.
- Intelligent path management
- Integration with development tools
- Credential handling via macOS keychain
- Performance optimizations
~/.config/fish/
├── config.fish # Main configuration file
└── fish_plugins # Plugins managed by Fisher
The following plugins are used to enhance the Fish shell experience:
jorgebucaran/fisher # Package manager for Fish
patrickf1/fzf.fish # Fuzzy finder integration
jethrokuan/z # Directory jumping (like zoxide)
ilancosman/tide@v6 # Modern prompt
franciscolourenco/done # Notification when commands complete
jorgebucaran/autopair.fish # Auto-pair brackets and quotes
nickeb96/puffer-fish # Additional abbreviations
lewisacidic/fish-git-abbr # Git abbreviations
halostatue/fish-chezmoi@v1 # Chezmoi integration
gazorby/fish-abbreviation-tips # Abbreviation usage tips
plttn/fish-eza # Eza (ls replacement) integration
Key environment variables set in the Fish configuration:
# XDG Base Directories
set -gx XDG_CONFIG_HOME $HOME/.config
set -gx XDG_DATA_HOME $HOME/.local/share
set -gx XDG_CACHE_HOME $HOME/.cache
# Node.js
set -gx NODE_EXTRA_CA_CERTS "$HOME/Library/Application Support/mkcert/rootCA.pem"
set -gx BUN_INSTALL "$HOME/.bun"
set -gx PNPM_HOME "$HOME/.local/share/pnpm"
set -gx NODE_OPTIONS --no-deprecation
# Android SDK
set -gx ANDROID_HOME "$HOME/Library/Android/sdk"
set -gx ANDROID_SDK_ROOT "$HOME/Library/Android/sdk"Useful aliases configured in Fish:
alias y="yazi" # File manager
alias lg="lazygit" # Git TUI
alias cat="bat" # Enhanced cat
alias edit-fish="nvim ~/.config/fish/config.fish"
alias reload-fish="source ~/.config/fish/config.fish"
alias cd="z" # Use zoxide for smart directory jumpingFast Node Manager (FNM) is integrated to manage Node.js versions:
# FNM Environment for Node Version Management
if status --is-interactive
# Ensure fnm sets up its Node environment on every new session.
fnm env --use-on-cd --shell fish | source
endFish is configured with Vi key bindings for navigation:
fish_vi_key_bindingsWhile Fish is the primary shell, ZSH configuration is maintained for compatibility and reference.
~/.config/zsh/
├── .zshrc # Main configuration
└── completions/ # Custom completions
ZSH uses Zinit for plugin management with lazy-loading for performance:
# Load essential Zinit annexes
zinit light-mode for \
zdharma-continuum/zinit-annex-as-monitor \
zdharma-continuum/zinit-annex-bin-gem-node \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-rust# Core utilities
zinit light zsh-users/zsh-autosuggestions # Intelligent suggestions
zinit light zsh-users/zsh-history-substring-search # History search
zinit light wfxr/forgit # Git workflow improvements
zinit light ael-code/zsh-colored-man-pages # Colored manual pages
zinit light hcgraf/zsh-sudo # Easy sudo prefixing- Optimized through lazy-loading
- Deferred loading of heavy components (fnm, 1Password)
- Compiled completion cache
- Typical startup time: 150-200ms (vs 800ms+ with Oh-My-Zsh)
To switch between Fish and ZSH:
- Fish to ZSH: Run
zshin your terminal - ZSH to Fish: Run
fishin your terminal - Make Fish your default:
echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells chsh -s /opt/homebrew/bin/fish
- Make ZSH your default:
chsh -s /bin/zsh
Both shells include common functionality for:
- FZF integration for fuzzy finding
- Zoxide for smart directory jumping
- Lazy-loading of API keys from the macOS keychain
- Homebrew package management