From 97d3c13a9af8772d75ee7db8ef46580b1a0bb10f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 09:47:49 +0000 Subject: [PATCH] fish: add ~/bin and ~/.local/bin to PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fish never set up PATH the way the bash/zsh stack does. rc.common prepends "$HOME/bin:$HOME/.local/bin" to PATH, but fish's config had no equivalent — only the macOS-only Homebrew shellenv block. On Linux where fish is the login shell (e.g. SSH after chsh to fish), the login PATH lacks ~/bin, so tools installed there are invisible. starship (installed to ~/bin by setup/tools.sh) couldn't be found, so `type -q starship` in config.fish was false and the prompt block was silently skipped — fish fell back to its default prompt instead of starship. Add conf.d/path.fish using fish_add_path so fish owns its PATH setup, mirroring rc.common. conf.d loads before config.fish, so PATH is ready before the starship block runs. Also drop functions/fish_prompt.fish: it was a verbatim copy of fish's built-in default prompt and only mattered as a fallback when starship was absent. It is redundant (fish's built-in default is identical) and was a red herring while diagnosing the missing prompt. https://claude.ai/code/session_01MWWuGHpDryzmyVdGGVvtZ1 --- home/.config/fish/conf.d/path.fish | 13 +++++++++++ home/.config/fish/functions/fish_prompt.fish | 23 -------------------- 2 files changed, 13 insertions(+), 23 deletions(-) create mode 100644 home/.config/fish/conf.d/path.fish delete mode 100644 home/.config/fish/functions/fish_prompt.fish diff --git a/home/.config/fish/conf.d/path.fish b/home/.config/fish/conf.d/path.fish new file mode 100644 index 0000000..2088ad0 --- /dev/null +++ b/home/.config/fish/conf.d/path.fish @@ -0,0 +1,13 @@ +# PATH — fish is the first-class shell, so it owns its own PATH setup +# rather than relying on rc.common (which serves bash/zsh). Mirrors: +# rc.common: export PATH="$HOME/bin:$HOME/.local/bin:$PATH" +# +# Without this, a fish login shell (e.g. SSH'd into Linux where fish is the +# login shell) never sees ~/bin, so tools installed there — notably starship +# (setup/tools.sh installs it to ~/bin) — are invisible and the starship +# prompt block in config.fish is silently skipped. +# +# fish_add_path is idempotent. -g keeps it session-global (driven entirely by +# this committed config, reproducible across machines, no per-host universal +# vars) and -p prepends in the given order. +fish_add_path -gp $HOME/bin $HOME/.local/bin diff --git a/home/.config/fish/functions/fish_prompt.fish b/home/.config/fish/functions/fish_prompt.fish deleted file mode 100644 index 6244867..0000000 --- a/home/.config/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,23 +0,0 @@ -function fish_prompt --description 'Write out the prompt' - # Save our status - set -l last_pipestatus $pipestatus - - set -l color_cwd - set -l suffix - switch "$USER" - case root toor - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - set suffix '#' - case '*' - set color_cwd $fish_color_cwd - set suffix '>' - end - - echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) \ - (__fish_print_pipestatus " [" "]" "|" (set_color $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus) \ - (set_color normal) "$suffix " -end