-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Description
The logic here ignores the value of _ZO_RESOLVE_SYMLINKS on Windows, but Windows can have symlinks.
Lines 10 to 19 in ecf72c9
| # pwd based on the value of _ZO_RESOLVE_SYMLINKS. | |
| __zoxide_pwd() { | |
| {%- if cfg!(windows) %} | |
| \command cygpath -w "$(\builtin pwd -P)" | |
| {%- else if resolve_symlinks %} | |
| \command pwd -P | |
| {%- else %} | |
| \command pwd -L | |
| {%- endif %} | |
| } |
Here is a reproducible example from my busybox.exe (ash) shell:
# Create directory and symlink to it
$ cd G:\repro
$ mkdir directory
$ ln -s directory symlink
$ cd symlink
$ pwd -L
G:/repro/symlink
$ pwd -P
G:/repro/directory
# cygpath is not available on $PATH and is not necessary in busybox.
# But for completeness, just showing that it understands the symlink, too.
$ 'C:\program files\git\usr\bin\cygpath.exe' -w $(pwd -L)
G:\repro\symlink
$ 'C:\program files\git\usr\bin\cygpath.exe' -w $(pwd -P)
G:\repro\directoryMetadata
Metadata
Assignees
Labels
No labels