Skip to content

Get $fish_path from the command line associated with $fish_pid#637

Open
dljsjr wants to merge 1 commit intoIlanCosman:mainfrom
dljsjr:patch-1
Open

Get $fish_path from the command line associated with $fish_pid#637
dljsjr wants to merge 1 commit intoIlanCosman:mainfrom
dljsjr:patch-1

Conversation

@dljsjr
Copy link
Copy Markdown

@dljsjr dljsjr commented Feb 17, 2026

This PR retrieves the path to the Fish executable using ps and the current $fish_pid variable.

Motivation and Context

The primary motivation is to make the generated/eval'd fish_prompt function more resilient to environments where the fish binary is a symlink, and the symlink target moves around.

It may also help with the fact that status fish-path can only report fish on OpenBSD, but I don't have any way to test that.

The most immediate "downside" here is that it relies on ps, which doesn't have a fish built-in fallback; it's unclear to me if that's actually problematic in practice or not.

Closes #627

How Has This Been Tested

  • I have tested using Linux.
  • I have tested using MacOS.

This PR retrieves the path to the Fish executable using `ps` and the current `$fish_pid` variable.

This can make the generated/`eval`'d `fish_prompt` function more resilient to environments where the `fish` binary is a symlink, and the symlink target moves around.

It *may* also help with the fact that `status fish-path` can only report `fish` on OpenBSD, but I don't have any way to test that.

The most immediate "downside" here is that it relies using `ps`, which doesn't have a fish built-in fallback; it's unclear to me if that's problematic or not.

Resolves: IlanCosman#627
@dljsjr dljsjr requested a review from IlanCosman as a code owner February 17, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated fish path in fish_prompt

1 participant