Skip to main content

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:

Core Config

Notable responsibilities in this file:

  • sets editor to nvim
  • exports SSH_AUTH_SOCK for 1Password
  • configures Homebrew path via homebrewPrefix prompt data
  • loads API keys from pass into environment variables
  • adds ~/bin and ~/.local/bin to PATH on login

It also initializes a few tools if present:

Startup Model

Fish setup in this repo is split by shell mode:

  • Login shell:
    • Adds Homebrew, ~/.local/bin, ~/bin, and mise shims to PATH.
  • Interactive shell:
    • Adds aliases (g, v, c, t, and others).
    • Initializes prompt/tools (starship, zoxide, navi when installed).

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:

Password-Store Switching (Non-Work Machines)

Two helper functions are defined in fish:

  • wpass: points PASSWORD_STORE_DIR at ~/.password-store-work
  • ppass: unsets PASSWORD_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:

Troubleshooting

  • command not found for ,commands:
    • check ~/bin in PATH
    • run chezmoi apply again
  • Missing API keys:
    • verify pass is installed and unlocked
    • verify the expected secret paths exist in your password store
  • Wrong password store selected:
    • run ppass to clear PASSWORD_STORE_DIR

Making Fish Your Login Shell

The setup script installs fish and will attempt to set it as your main shell: