New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PWD not updated properly #5647
Comments
@ridiculousfish: I'm assuming dfa6192 trusts $PWD, without checking that it actually represents the working directory correctly? |
Any update on this one? |
Ok a timeline: In fish 2.x, In fish 3.0.0, $PWD was separate from In fish 3.0.1 that bug was fixed, so $PWD is $PWD, and the working directory is the working directory, and fish makes no attempt to second-guess either. In the command: fish is fine with this disagreement, while other shells apparently try to fix it, but only at launch. It seems like what is desired it "allow PWD and cwd to disagree, except at launch, where we retain PWD only if it can be resolved to the cwd". If this |
I came to this issue because I had this bug in the terminal of all JetBrains IDEs, including Android Studio, as well as in VSCode - while So, I guess this pattern is common enough to warrant implementing a workaround in fish as well. |
This breaks almost all terminals nested in the editors. Vim and NeoVim are affected as well. And as I am heavy user of such features it is very painful problem for me. |
This also breaks at least two commonly used terminals (Alacritty, Termite) when supplying a current working directory option. |
Same problem with VSCode. There is a workaround: microsoft/vscode#68488 (comment). |
I think we need to do a 3.0.2 perhaps for this fix alone. |
Anyone experiencing this, I would appreciate testing on Integration_3.0.2 (commit 5c994b0). |
Workaround for NeoVim (do not work in Vim as it has no augroup workaround_fish_issue
autocmd!
autocmd DirChanged * let $PWD = v:event.cwd
augroup END |
Just built
|
@ridiculousfish built via |
Executing the following command:
With fish version 3.0.0 this prints
/tmp
, as expected.With fish version 3.0.1 this prints
/home/foonathan
, which is incorrect.The same is true when disabling third-party customizations. I'm using Arch Linux and the behavior can be reproduced on all kinds of terminals.
The text was updated successfully, but these errors were encountered: