From 21076809adb31a3dc9191e7c9075d88ec13ad53c Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 1 Aug 2010 16:37:51 +0000 Subject: sh: Do not enter consecutive duplicates into the history. This simply sets a flag in libedit. It has a shortcoming in that it does not apply to multi-line commands. Note that a configuration option for this is not going to happen, but always having this seems better than not having it. NetBSD has done the same. PR: bin/54683 Obtained from: NetBSD MFC after: 1 month --- bin/sh/histedit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index b76d73d..d92a7a3 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -168,6 +168,7 @@ sethistsize(hs) (histsize = atoi(hs)) < 0) histsize = 100; history(hist, &he, H_SETSIZE, histsize); + history(hist, &he, H_SETUNIQUE, 1); } } -- cgit v1.1