diff options
author | jilles <jilles@FreeBSD.org> | 2010-08-01 16:37:51 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-08-01 16:37:51 +0000 |
commit | 21076809adb31a3dc9191e7c9075d88ec13ad53c (patch) | |
tree | a4efb37a0d6ab70bbfbc12cebe50ec625cb23af7 /bin | |
parent | 3c2469212a3c454f067ae11dbbdd9af10d56b851 (diff) | |
download | FreeBSD-src-21076809adb31a3dc9191e7c9075d88ec13ad53c.zip FreeBSD-src-21076809adb31a3dc9191e7c9075d88ec13ad53c.tar.gz |
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
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/histedit.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } } |