Shell: Fish
Fish is the primary shell in this setup.
Zsh and Bash are also configured so the environment is usable even if you don't switch your login shell.
Relevant files:
- Bash:
home/readonly_dot_bashrc.tmpl,home/readonly_dot_bash_profile - Zsh:
home/readonly_dot_zshrc.tmpl,home/readonly_dot_zprofile, completions inhome/dot_zsh/completions/ - POSIX profile:
home/readonly_dot_profile.tmpl
Core Config
Notable responsibilities in this file:
- sets editor to
nvim - exports
SSH_AUTH_SOCKfor 1Password - configures Homebrew path via
homebrewPrefixprompt data - loads API keys from
passinto environment variables - adds
~/binand~/.local/binto PATH on login
It also initializes a few tools if present:
- Starship prompt (
home/dot_config/readonly_starship.toml) - zoxide (smarter
cd) - fzf integration via
PatrickF1/fzf.fish
Startup Model
Fish setup in this repo is split by shell mode:
- Login shell:
- Adds Homebrew,
~/.local/bin,~/bin, and mise shims toPATH.
- Adds Homebrew,
- Interactive shell:
- Adds aliases (
g,v,c,t, and others). - Initializes prompt/tools (
starship,zoxide,naviwhen installed).
- Adds aliases (
If a command works in one terminal but not another, check whether the shell is login vs non-login.
Non-fish startup files are intentionally side-effect free for secret loading: pass-based API key exports run in fish config, not in home/readonly_dot_profile.tmpl.
Verification Workflows
Confirm effective shell + path
echo "$SHELL"
fish --version
echo "$PATH"
Confirm key runtime wiring
echo "$SSH_AUTH_SOCK"
Confirm API key loading behavior
echo "${OPENAI_API_KEY:+set}"
echo "${ANTHROPIC_API_KEY:+set}"
echo "${GEMINI_API_KEY:+set}"
Ignore Globs (fd / ripgrep / fzf)
This setup keeps a shared ignore-globs file used by fd/fzf defaults:
In fish, it's wired via:
FD_DEFAULT_OPTSinhome/dot_config/fish/readonly_config.fish.tmpl
Password-Store Switching (Non-Work Machines)
Two helper functions are defined in fish:
wpass: pointsPASSWORD_STORE_DIRat~/.password-store-workppass: unsetsPASSWORD_STORE_DIR(back to default store)
Verification:
wpass
echo "$PASSWORD_STORE_DIR"
ppass
echo "$PASSWORD_STORE_DIR"
Fish Plugins
Fish plugins are managed with Fisher:
- Plugin list:
home/dot_config/fish/readonly_fish_plugins - Hook:
home/.chezmoiscripts/run_onchange_after_04-update-fish-packages.fish.tmpl
Troubleshooting
command not foundfor,commands:- check
~/bininPATH - run
chezmoi applyagain
- check
- Missing API keys:
- verify
passis installed and unlocked - verify the expected secret paths exist in your password store
- verify
- Wrong password store selected:
- run
ppassto clearPASSWORD_STORE_DIR
- run
Making Fish Your Login Shell
The setup script installs fish and will attempt to set it as your main shell: