-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
When starting a new Fish shell in Terminal, for example by opening a new tab with Command+T, the title bar will indicate that bash
is running and trying to close the tab will show the "Closing this tab will terminate the running process bash." warning.
Running ps
in this state shows the following:
$ ps
PID TTY TIME CMD
25211 ttys000 0:00.03 -fish
25219 ttys000 0:00.00 <defunct>
When the process disappears seems to be a bit random, usually it disappears when pressing enter
, sometimes it disappears after a short while without it.
I am admittedly not sure what exactly is happening here, but after some troubleshooting, I found that commenting out this line:
disown $last_pid &>/dev/null |
seems to fix the issue.
I also tried the following:
- Replacing
fish_prompt
with a stub function fixes/avoids the issue.- Running
fish_git_prompt
manually can still trigger it.
- Running
- I had an LLM add a bunch of
echo
commands throughoutfish_prompt
, which also "fixed" it.- Probably by slowing down the function, maybe the new blazingly-fast Rust code brought this issue to the surface?
Edit: I added a very short sleep
to the end of fish_prompt
and it indeed "fixed" the issue similar to the echo
s I mentioned above.
Edit 2:
$ fish -v
fish, version 4.0.0
$ which fish
/opt/homebrew/bin/fish
Issue started after the update to 4.0.0
.