zsh-workers
 help / color / mirror / Atom feed
* 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

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git