From 1be5e68e994b72ff60aa6221420761fe0f7271a2 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Wed, 1 Oct 2014 12:27:32 -0700 Subject: Export $HOME if we have to calculate it If $HOME is unset in the environment, fish calculates it with getpwnam(). However, it wasn't being exported. Just like the $USER calculation, $HOME should probably be exported, because everyone will assume that it's an environment variable (as opposed to an unexported global variable). --- env.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env.cpp b/env.cpp index 2fe3767b..749c1b1b 100644 --- a/env.cpp +++ b/env.cpp @@ -562,7 +562,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */) if (pw->pw_dir != NULL) { const wcstring dir = str2wcstring(pw->pw_dir); - env_set(L"HOME", dir.c_str(), ENV_GLOBAL); + env_set(L"HOME", dir.c_str(), ENV_GLOBAL | ENV_EXPORT); } free(unam_narrow); } -- cgit v1.2.3