You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ihave two directorys foo and bar and a symlink link pointing to foo.
If I open a terminal and navigate into link everything works as expected. ls returns the content of the directory and I can navigate to subfolders using cd, etc..
If I now delete the symlink link and create a new symlink link pointing to bar
The terminal that I have open from before does not allow me to navigate to subfolders of foo anymore instead it autocompletes and navigates to subfolders of bar . But ls still shows the contents of foo and I can still open files in foo with commands like cat.
These seems unintended.
Minimal Example to reproduce
Shell 1
mkdir foo/a -p
mkdir bar/b -p
ln -s foo link
Shell 2
cd link
Shell 1
rm link
ln -s bar link
Shell 2
ls # a/
cd a # cd: The directory 'a' does not exist
cd b
Fish, like other shells, keeps a "logical" working directory.
That means it knows about /tmp/link. But any command it runs will get the "physical" working directory, which is the directory that was originally behind the link.
Other shells will behave the same way, and if you start a sub-fish it will think it is in "/tmp/foo" as well (because it asks the kernel for the working directory).
I will try to explain using an example:
Ihave two directorys
foo
andbar
and a symlinklink
pointing tofoo
.If I open a terminal and navigate into
link
everything works as expected.ls
returns the content of the directory and I can navigate to subfolders usingcd
, etc..If I now delete the symlink
link
and create a new symlinklink
pointing tobar
The terminal that I have open from before does not allow me to navigate to subfolders of
foo
anymore instead it autocompletes and navigates to subfolders ofbar
. But ls still shows the contents offoo
and I can still open files infoo
with commands likecat
.These seems unintended.
Minimal Example to reproduce
Shell 1
Shell 2
Shell 1
Shell 2
fish: 3.7.0
system: fedora 39 6.7.9-200.fc39.x86_64
terminal: xterm-256color
The text was updated successfully, but these errors were encountered: