about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Src/exec.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 36c73eb5a..9dbdbdf27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
 
 2015-06-16  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 35493: Src/exec.c: erase $_ when the command line is an assignment
+
 	* 35482: Src/init.c: be consistent about how argzero is allocated
 
 2015-06-14  Barton E. Schaefer  <schaefer@zsh.org>
diff --git a/Src/exec.c b/Src/exec.c
index daed3b111..35a101b9c 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1115,6 +1115,7 @@ execsimple(Estate state)
     if (code == WC_ASSIGN) {
 	cmdoutval = 0;
 	addvars(state, state->pc - 1, 0);
+	setunderscore("");
 	if (isset(XTRACE)) {
 	    fputc('\n', xtrerr);
 	    fflush(xtrerr);