summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/params.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 56198d5f6..d511f2d5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-20  Peter Stephenson  <pws@csr.com>
+
+	* 20391: Src/params.c: SHLVL didn't get updated in the
+	environment if it was already present.
+
 2004-09-20  Bart Schaefer  <schaefer@zsh.org>
 
 	* 20388: Src/Zle/zle_main.c: arrange that "zle internal-widget"
diff --git a/Src/params.c b/Src/params.c
index 7ba0359b7..98888e7b0 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -594,8 +594,8 @@ createparamtable(void)
 	addenv(pm, pm->u.str);
     pm = (Param) paramtab->getnode(paramtab, "SHLVL");
     sprintf(buf, "%d", (int)++shlvl);
-    if (!(pm->flags & PM_EXPORTED))
-	addenv(pm, buf);
+    /* shlvl value in environment needs updating unconditionally */
+    addenv(pm, buf);
 
     /* Add the standard non-special parameters */
     set_pwd_env();