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
This commit is contained in:
Jilles Tjoelker 2010-08-01 16:37:51 +00:00
parent 32c50473a8
commit 933803fb21
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210736

View File

@ -168,6 +168,7 @@ sethistsize(hs)
(histsize = atoi(hs)) < 0)
histsize = 100;
history(hist, &he, H_SETSIZE, histsize);
history(hist, &he, H_SETUNIQUE, 1);
}
}