From 3b9075049c35031e4a7e4857b401ab704471b10c Mon Sep 17 00:00:00 2001 From: ac-stef Date: Thu, 12 Feb 2015 12:17:04 +0100 Subject: [PATCH] omit commands with leading blanks from history like "HISTCONTROL = ignorespace" in bash --- source/src/console.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/src/console.cpp b/source/src/console.cpp index 8291ce65..c232a83b 100644 --- a/source/src/console.cpp +++ b/source/src/console.cpp @@ -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; }