Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: cd does not update $PWD in a timely fashion.



Matthew Martin wrote on Sat, 27 Jun 2020 02:25 -0500:
> +++ b/Test/B01cd.ztst
> @@ -149,6 +149,21 @@ F:something is broken.  But you already knew that.
> + chpwd_hook() { hook_pwd=$PWD; }
> + chpwd_functions=(chpwd_hook)
> + cd $mydir/cdtst.tmp/foo &&
> + (cd $mydir; mv $mydir/cdtst.tmp/{foo,bar}) &&
> + print $PWD &&
> + print $hook_pwd &&
> + cd . &&
> + print $PWD

Is the lack of «&&» on this line intentional?

> + print $hook_pwd &&

Run «unset chpwd_functions» here so as not to affect subsequent tests
(once they're added)?  Compare 46067.

> +0q:cd . with moved PWD

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author