1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-02 20:00:57 +02:00

Support "builtin" in the HIST_NO_STORE check.

This commit is contained in:
Wayne Davison 2000-07-20 07:09:34 +00:00
parent 07d524a92f
commit 01ea5e83c5

View file

@ -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;