Open jaminthorns opened 1 year ago
It looks like this was caused by #185355 and has broken prompts that rely on variables local to the file that declares the fish prompt function. It's simple enough to reproduce with the following fish_prompt.fish
file:
set TEST hello
function fish_prompt
echo $TEST
end
Now, in settings, disable Terminal › Integrated › Shell Integration: Enabled. Create a new terminal window and you should see "hello" as the prompt. Enable shell integration once more and create another new terminal window, the prompt will now be blank.
EDIT: Specifically, it's copying the fish_prompt
function that breaks the link to the local variables. From the man pages:
Copying a function using -c copies only the body of the function, and does not attach any event notifications from the original function.
This implies to me that a new function is created using the function source text, and it's not copying a reference like you might expect as a JavaScript developer. I think #185355 may need reverting.
I've tested this and can confirm it's not the case. So something else is going on and that needs a deeper dive than I can spare time for right now.
Yep same issue here
Same issue, though in my case I'm seeing an extra newline at the end of the prompt. https://github.com/IlanCosman/tide/issues/433
Just to add to this, I use Hydro and just noticed that I am encountering this problem. Disabling the shell integration works.
Steps to Reproduce
Observe broken prompt and error messages when starting an integrated terminal:
Screenshots
Shell integration disabled, Tide installed
Shell integration enabled, Tide not installed
Shell integration enabled, Tide installed (prompt broken)