Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
`pwd -P` with systemd-homed causes inconsistent cwd state
- X-seq: zsh-workers 52236
- From: Kyle Laker <kyle@laker.email>
- To: zsh-workers@xxxxxxx
- Subject: `pwd -P` with systemd-homed causes inconsistent cwd state
- Date: Fri, 20 Oct 2023 23:18:03 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kylelaker.com; dmarc=pass action=none header.from=laker.email; dkim=pass header.d=laker.email; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fSou09KUWNdQOgJYc6i/7GtcEdN5E7FagZL7OCFp3Kg=; b=i5FRjjs6U2QfDY8Ny8uJWVaCA+GUsnDeZoiCRegyJ3X40fAFrUJZy8fn6Y8eEmMsNkv/0w/lk4gIX0ouSbM61KHndDkE9+UHtVlAZVZ+ownxJYM2w2RBglQbR+3yLRN6d3MBm/EdBozQjC3vXq2kSYrhGmoCIfcTYUef0qnoAls+8gnSA6rGn0BFktix5XJBMAvezwzZwENADl+n6zHWLkw2n2cSRzz3FgDdqKK24AyDyLcFRgjxtrCM/BmTGVnK/6FSsu1KyDeeIC4Yiz1F7Ll8SCzFXpwA04xOEbSr4jbEuxi3NPYz6ZXIwtgeVTdirjSYlydtluYFEJ8zODXwrw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cgqziFJCc2NhOKQHYVmg+VnEcLJ9H7iWqj4uXQaObHdaDmK/Sqc0NxxabIGZPCGM/ck+NIyNkCpACj1KbYg4ye1JjYFRVGmrfE3+5sEXtObqC46Wd0Gjm8o0bLAU3mulunY6l8oFBr8m5elx0CwJLpTMsO44mSWkLs3qaeCYz0TCcq7jU3jDtBBRS20bGa1WAQVkSo7KR+oVJ3QQr6dZK1m/hKouWx+rgbUu5e8BLwozOcpTR4QPFIH7a6FII6w9pQ0fmaUJOiFxg/dXQgV3PhHUmqRVuGdu6LTsHznAEuJQqLoL46MkC393eJkDi0jaiXMLq3q5/uzY2HrY6tLCsQ==
- Archived-at: <https://zsh.org/workers/52236>
- List-id: <zsh-workers.zsh.org>
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author