diff options
-rw-r--r-- | Src/hist.c | 9 |
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; |