From: Kyle Laker <kyle@laker.email>
To: zsh-workers@zsh.org
Subject: `pwd -P` with systemd-homed causes inconsistent cwd state
Date: Fri, 20 Oct 2023 23:18:03 -0400 [thread overview]
Message-ID: <f31c3d78-11de-4aac-81d7-c061916a9108@laker.email> (raw)
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?
next reply other threads:[~2023-10-21 3:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-21 3:18 Kyle Laker [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f31c3d78-11de-4aac-81d7-c061916a9108@laker.email \
--to=kyle@laker.email \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).