zsh-workers
 help / color / mirror / code / Atom feed
* cd does not update $PWD in a timely fashion.
@ 2020-06-26 17:24 Han Boetes
  2020-06-26 17:32 ` Matthew Martin
  0 siblings, 1 reply; 5+ messages in thread
From: Han Boetes @ 2020-06-26 17:24 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

I had this program changing the name of the current working directory and
noticed cd .; echo $PWD didn't pick up the changes.

The following code replicates the problem.

% set -x;mkdir foo; cd foo; mv ~/foo ~/bar; echo $PWD;pwd; readlink -f .;
cd .; echo $PWD ;pwd; readlink -f .; cd .; echo $PWD ;pwd; readlink -f .
+/bin/zsh:8> mkdir foo
+/bin/zsh:8> cd foo
+/bin/zsh:8> mv -i /home/han/foo /home/han/bar
+/bin/zsh:8> echo /home/han/foo
/home/han/foo
+/bin/zsh:8> pwd
/home/han/foo
+/bin/zsh:8> readlink -f .
/home/han/bar
+/bin/zsh:8> cd .
+/bin/zsh:8> echo /home/han/foo
/home/han/foo
+/bin/zsh:8> pwd
/home/han/bar
+/bin/zsh:8> readlink -f .
/home/han/bar
+/bin/zsh:8> cd .
+/bin/zsh:8> echo /home/han/bar
/home/han/bar
+/bin/zsh:8> pwd
/home/han/bar
+/bin/zsh:8> readlink -f .
/home/han/bar


With kind regards,
Han

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-01  4:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 17:24 cd does not update $PWD in a timely fashion Han Boetes
2020-06-26 17:32 ` Matthew Martin
2020-06-27  7:25   ` Matthew Martin
2020-06-27 20:42     ` Daniel Shahaf
2020-07-01  4:41       ` Matthew Martin

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).