diff --git a/CHANGELOG.md b/CHANGELOG.md index ea3fac1a..7a6efd08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,8 +63,10 @@ * `DECRPM` replies (to `DECRQM` queries) now report a value of `4` ("permanently reset") instead of `2` ("reset") for DEC private modes that are known but unsupported. +* Set `PWD` environment variable in the slave process ([#1179][1179]). [1166]: https://codeberg.org/dnkl/foot/issues/1166 +[1179]: https://codeberg.org/dnkl/foot/issues/1179 ### Deprecated diff --git a/slave.c b/slave.c index 6473ac7c..4dd80e6f 100644 --- a/slave.c +++ b/slave.c @@ -352,6 +352,7 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv, setenv("TERM", term_env, 1); setenv("COLORTERM", "truecolor", 1); + setenv("PWD", cwd, 1); #if defined(FOOT_TERMINFO_PATH) setenv("TERMINFO", FOOT_TERMINFO_PATH, 1);