zsh-workers
 help / color / mirror / code / Atom feed
* `pwd -P` with systemd-homed causes inconsistent cwd state
@ 2023-10-21  3:18 Kyle Laker
  2023-10-21  4:05 ` Bart Schaefer
  0 siblings, 1 reply; 12+ messages in thread
From: Kyle Laker @ 2023-10-21  3:18 UTC (permalink / raw)
  To: zsh-workers

I have found a strange behavior with ZSH when working with 
systemd-homed. After running `pwd -P` within my home directory, it seems 
as if the current working directory effectively changes to `/`. I am 
currently using ZSH 5.9 and systemd 254.

systemd-homed is configured using a BTRFS subvolume. My home directory 
is `/home/kyle` whereas the systemd-homed image is located at 
`/home/kyle.homedir`. Running `pwd -P` prints the current directory 
under the homed image path which isn't entirely unexpected (though this 
behavior differs from that of other shells such as bash and fish which 
still print `/home/kyle/...`). What is unexpected is that after running 
`pwd -P` all other subprocesses act as if the `cwd` is `/` (though the 
`pwd` builtin and `$PWD` env var do not show any chagne).

To summarize what I am seeing:

```
% ls
test.txt
% pwd
/home/kyle/test
% pwd -P
/home/kyle.homedir/test
% ls
bin  boot  dev	etc  home  lib	lib64  mnt  opt  proc  root  run  sbin	srv 
  sys  tmp  usr  var
% pwd
/home/kyle/test
% /bin/pwd
/
% zsh -c "pwd"
/
% cd .
% ls
test.txt
% /bin/pwd
/home/kyle/test
% pwd
/home/kyle/test
```

Is there a configuration change that I need to make for ZSH or for 
systemd-homed to not end up with an inconsistent cwd state after running 
the `pwd` command?


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

end of thread, other threads:[~2023-11-23 17:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-21  3:18 `pwd -P` with systemd-homed causes inconsistent cwd state Kyle Laker
2023-10-21  4:05 ` Bart Schaefer
2023-10-21 16:26   ` Kyle Laker
2023-10-22 18:59     ` Bart Schaefer
2023-10-31  3:46       ` [PATCH] " Bart Schaefer
2023-11-02  2:54         ` Kyle Laker
2023-11-03  4:28           ` Bart Schaefer
2023-11-05 14:16             ` Kyle Laker
2023-11-05 16:17               ` Bart Schaefer
2023-11-05 21:10                 ` Bart Schaefer
2023-11-20 22:23                   ` Jan Alexander Steffens (heftig)
2023-11-23 17:53                     ` Bart Schaefer

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