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
- Install fish via Homebrew
- Install and configure Tide
- Update fish via
brew upgrade fish
- Open a new terminal or run any command
- 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.
Describe the bug
When fish is installed via Homebrew and gets updated, the prompt breaks because
fish_prompt.fishcaptures the absolute Cellar path (e.g.,/opt/homebrew/Cellar/fish/4.3.2/bin/fish) viastatus fish-pathat 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/fishSteps to reproduce
brew upgrade fishfish: Unknown command: /opt/homebrew/Cellar/fish/OLD_VERSION/bin/fishEnvironment
Output of
tide bug-report: (unable to run - fish prompt is broken)Additional context
The issue is on line 14 of
fish_prompt.fish:This captures the versioned Cellar path. A fix would be to use the stable Homebrew symlink instead:
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.fishline 14 to use/opt/homebrew/bin/fish, then restart terminal.