Skip to content

Outdated fish path in fish_prompt #627

@alexander-turner

Description

@alexander-turner

Describe the bug

When fish is installed via Homebrew and gets updated, the prompt breaks because fish_prompt.fish captures the absolute Cellar path (e.g., /opt/homebrew/Cellar/fish/4.3.2/bin/fish) via status fish-path at load time. This path is embedded in the eval'd functions. When Homebrew updates fish and removes the old version, that path becomes invalid, causing errors like:

  fish: Unknown command: /opt/homebrew/Cellar/fish/4.3.2/bin/fish

Steps to reproduce

  1. Install fish via Homebrew
  2. Install and configure Tide
  3. Update fish via brew upgrade fish
  4. Open a new terminal or run any command
  5. See error: fish: Unknown command: /opt/homebrew/Cellar/fish/OLD_VERSION/bin/fish

Environment

Output of tide bug-report: (unable to run - fish prompt is broken)

  • macOS
  • fish installed via Homebrew
  • Tide version: latest

Additional context

The issue is on line 14 of fish_prompt.fish:

status fish-path | read -l fish_path

This captures the versioned Cellar path. A fix would be to use the stable Homebrew symlink instead:

  set -l fish_path /opt/homebrew/bin/fish

Or perhaps detect if fish was installed via Homebrew and use the symlink path in that case.

Workaround: Manually edit ~/.config/fish/functions/fish_prompt.fish line 14 to use /opt/homebrew/bin/fish, then restart terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions