about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2000-07-20 07:09:34 +0000
committerWayne Davison <wayned@users.sourceforge.net>2000-07-20 07:09:34 +0000
commit01ea5e83c50e29640ffb37bcd546929c9f4c9bb0 (patch)
treece3e37c0160af518c0f90cafade0f76e85e452fc
parent07d524a92f988835e4ed0c63325f788d18f56134 (diff)
downloadzsh-01ea5e83c50e29640ffb37bcd546929c9f4c9bb0.tar.gz
zsh-01ea5e83c50e29640ffb37bcd546929c9f4c9bb0.tar.xz
zsh-01ea5e83c50e29640ffb37bcd546929c9f4c9bb0.zip
Support "builtin" in the HIST_NO_STORE check.
-rw-r--r--Src/hist.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 5f026db34..f4de645e2 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -965,21 +965,24 @@ shouldIgnoreLine(Eprog prog)
 
     if (isset(HISTNOSTORE)) {
 	char *b = getpermtext(prog, NULL);
+	char *t = b;
+	if (*b == 'b' && strncmp(b, "builtin ", 8) == 0)
+	    b += 8;
 	if (*b == 'h' && strncmp(b, "history", 7) == 0
 	 && (!b[7] || b[7] == ' ')) {
-	    zsfree(b);
+	    zsfree(t);
 	    return 1;
 	}
 	if (*b == 'f' && b[1] == 'c' && b[2] == ' ' && b[3] == '-') {
 	    b += 3;
 	    do {
 		if (*++b == 'l') {
-		    zsfree(b);
+		    zsfree(t);
 		    return 1;
 		}
 	    } while (isalpha(*b));
 	}
-	zsfree(b);
+	zsfree(t);
     }
 
     return 0;