* Bug: pwd reports wrong path inside chpwd_functions
@ 2020-12-11 19:41 Ajeet D'Souza
2020-12-11 22:02 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Ajeet D'Souza @ 2020-12-11 19:41 UTC (permalink / raw)
To: zsh-workers
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: pwd reports wrong path inside chpwd_functions
2020-12-11 19:41 Bug: pwd reports wrong path inside chpwd_functions Ajeet D'Souza
@ 2020-12-11 22:02 ` Bart Schaefer
2020-12-12 21:33 ` Ajeet D'Souza
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2020-12-11 22:02 UTC (permalink / raw)
To: Ajeet D'Souza; +Cc: zsh-workers
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: pwd reports wrong path inside chpwd_functions
2020-12-11 22:02 ` Bart Schaefer
@ 2020-12-12 21:33 ` Ajeet D'Souza
0 siblings, 0 replies; 3+ messages in thread
From: Ajeet D'Souza @ 2020-12-12 21:33 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-workers
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-12 21:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 19:41 Bug: pwd reports wrong path inside chpwd_functions Ajeet D'Souza
2020-12-11 22:02 ` Bart Schaefer
2020-12-12 21:33 ` Ajeet D'Souza
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).