[-- Attachment #1: Type: text/plain, Size: 752 bytes --] Using pwd -L inside the chpwd_functions hook inside zsh returns an invalid path. Here are some steps to reproduce this: function print_dir() { pwd -L } ; chpwd_functions=(print_dir) ; mkdir -p /tmp/chdir-test/symbolic-links/ ; mkdir -p /tmp/chdir-test/actual-directories/folder1 ; mkdir -p /tmp/chdir-test/actual-directories/folder2 ; ln -s /tmp/chdir-test/actual-directories/folder1 /tmp/chdir-test/symbolic-links ; # This works fine: cd /tmp/chdir-test/symbolic-links/folder1 ; # >> /tmp/chdir-test/symbolic-links/folder1 # This prints a path that does not exist (try it with cd!) cd ../folder2 ; # >> /tmp/chdir-test/*symbolic-links*/folder2 # This works fine pwd -L ; # >> /tmp/chdir-test/*actual-directories*/folder2 Thanks, Ajeet D'Souza [-- Attachment #2: Type: text/html, Size: 1897 bytes --]
On Fri, Dec 11, 2020 at 11:42 AM Ajeet D'Souza <98ajeet@gmail.com> wrote:
>
> cd /tmp/chdir-test/symbolic-links/folder1 ;
> cd ../folder2 ;
> # >> /tmp/chdir-test/symbolic-links/folder2
I am not able to reproduce this from zsh -f with 5.8.0.2-dev
ubuntu% cd /tmp/chdir-test/symbolic-links/folder1
/tmp/chdir-test/symbolic-links/folder1
ubuntu% cd ../folder2
/tmp/chdir-test/actual-directories/folder2
I am able to reproduce with 5.8-3ubuntu1
This appears to have been fixed by commit 4e471c3 (workers/46168)
[-- Attachment #1: Type: text/plain, Size: 74 bytes --] Oh, awesome. Sorry, I should have tested with a dev build too. Thank you! [-- Attachment #2: Type: text/html, Size: 95 bytes --]