about summary refs log tree commit diff
path: root/Src/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Src/params.c b/Src/params.c
index 5e4231cac..a633fb579 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -690,6 +690,17 @@ createparamtable(void)
     *envp = '\0';
     opts[ALLEXPORT] = oae;
 
+    if (emulation == EMULATE_ZSH)
+    {
+	/*
+	 * For native emulation we always set the variable home
+	 * (see setupvals()).
+	 */
+	pm = (Param) paramtab->getnode(paramtab, "HOME");
+	pm->flags &= ~PM_UNSET;
+	if (!(pm->flags & PM_EXPORTED))
+	    addenv(pm, home);
+    }
     pm = (Param) paramtab->getnode(paramtab, "LOGNAME");
     if (!(pm->flags & PM_EXPORTED))
 	addenv(pm, pm->u.str);