git: 4aef1ae2113c - stable/15 - sh: Increase default history size to POSIX mandated minimum of 128
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Apr 2026 01:33:58 UTC
The branch stable/15 has been updated by ziaee:
URL: https://cgit.FreeBSD.org/src/commit/?id=4aef1ae2113cdb02bde5180155c4c362c8115102
commit 4aef1ae2113cdb02bde5180155c4c362c8115102
Author: Kristofer Peterson <kris@tranception.com>
AuthorDate: 2026-03-24 14:56:48 +0000
Commit: Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-04-16 01:33:35 +0000
sh: Increase default history size to POSIX mandated minimum of 128
The default history size in bin/sh is currently 100 however POSIX.1-2024
mandates that a default greater than or equal to 128 shall be used,
therefore this increases the default history size in /bin/sh to 128.
POSIX standards reference:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sh.html#tag_20_110_08
MFC after: 3 days
Reviewed by: emaste, jilles, jlduran, ziaee
Signed-off-by: Kristofer Peterson <kris@tranception.com>
Closes: https://github.com/freebsd/freebsd-src/pull/2093
(cherry picked from commit 81b2055c49dec8884d7bb23503f1dfeac37ac95d)
---
bin/sh/histedit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index 5aea58650c67..c18934be84bb 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -231,7 +231,7 @@ sethistsize(const char *hs)
if (hist != NULL) {
if (hs == NULL || !is_number(hs))
- histsize = 100;
+ histsize = 128;
else
histsize = atoi(hs);
history(hist, &he, H_SETSIZE, histsize);