omit commands with leading blanks from history

like "HISTCONTROL = ignorespace" in bash
This commit is contained in:
ac-stef
2015-02-12 12:17:04 +01:00
parent a284064e9f
commit 3b9075049c
+3 -1
View File
@@ -489,7 +489,9 @@ void savehistory()
if(!f) return;
loopv(history)
{
f->printf("%s\n",history[i]->buf);
hline *h = history[i];
if(!h->action && !h->prompt && strncmp(h->buf, "/ ", 2))
f->printf("%s\n",h->buf);
}
delete f;
}