Shell Configuration¶
This guide covers the shell configuration managed by this dotfiles repository, including zsh, bash, and related tools.
Z Shell (zsh)¶
The primary shell configuration is in dot_zshrc and includes:
Editor Configuration¶
Sets Visual Studio Code as the default editor for command-line operations.
Path Configuration¶
Ensures proper path ordering with local binaries taking precedence.
Homebrew Integration¶
Automatically configures Homebrew environment variables on Apple Silicon Macs.
Development Tools¶
mise¶
mise manages development tool versions (Node.js, Python, Ruby, etc.):
Features: - Per-project tool versions - Automatic version switching - Compatible with asdf plugins - Faster than alternatives
Usage:
# Install a tool
mise install node@20
# Use in current directory
mise use node@20
# Show installed tools
mise list
atuin¶
atuin provides enhanced shell history:
Features: - Searchable history across machines - Context-aware suggestions - Statistics and insights - Encrypted sync
Usage:
- Press Ctrl+R for interactive history search
- Press Up arrow for filtered history
- atuin search <query> for manual searches
Bash Configuration¶
The dot_bashrc file provides fallback bash configuration:
While zsh is the primary shell, bash configuration ensures compatibility when needed.
Customization¶
Adding Aliases¶
Edit your shell configuration in chezmoi:
Add your aliases:
Apply changes:
Changing Default Shell¶
To change your default shell:
Environment Variables¶
Add custom environment variables to your shell config:
For sensitive values, consider using 1Password:
Shell Prompt¶
The shell prompt is managed by: - oh-my-posh for PowerShell (see PowerShell Setup) - Default zsh prompt with git integration
To customize the zsh prompt, you can use popular frameworks: - Starship - Powerlevel10k - Oh My Zsh
Terminal Emulator¶
This configuration works with any terminal emulator. Popular choices: - iTerm2 - Feature-rich macOS terminal - Warp - Modern terminal with AI features - Alacritty - GPU-accelerated terminal - kitty - Fast, feature-full terminal
Troubleshooting¶
Command Not Found¶
If commands aren't found after applying changes:
Path Issues¶
Verify your PATH:
Check Homebrew installation:
Tool Version Issues¶
Check mise status:
Reset mise:
History Not Syncing¶
For atuin sync issues: