If you are symlinking scripts that rely on status -f being resolved to the original source, you will get the wrong file. Is this the correct behaviour of status -f and if so, is there a way to get the real path of the currently executed script?
Reproduction Steps:
mkdir -p /tmp/dir1
mkdir -p /tmp/dir2
echo 'status -f' > /tmp/dir1/real.fish
ln -s /tmp/dir1/real.fish /tmp/dir2/link.fish
Expected behavior:
$ fish /tmp/dir1/real.fish
/tmp/dir1/real.fish
$ fish /tmp/dir2/link.fish
/tmp/dir1/real.fish
Observed behavior:
$ fish /tmp/dir1/real.fish
/tmp/dir1/real.fish
$ fish /tmp/dir2/link.fish
/tmp/dir2/link.fish
Fish version: 2.2.0-747-ge395a0e
Operating system: Arch Linux, fish installed through AUR
Terminal or terminal emulator: termite
If you are symlinking scripts that rely on
status -fbeing resolved to the original source, you will get the wrong file. Is this the correct behaviour ofstatus -fand if so, is there a way to get the real path of the currently executed script?Reproduction Steps:
mkdir -p /tmp/dir1mkdir -p /tmp/dir2echo 'status -f' > /tmp/dir1/real.fishln -s /tmp/dir1/real.fish /tmp/dir2/link.fishExpected behavior:
Observed behavior:
Fish version: 2.2.0-747-ge395a0e
Operating system: Arch Linux, fish installed through AUR
Terminal or terminal emulator: termite