git: 9bc3d8e002b9 - stable/14 - sh: Increase default history size to POSIX mandated minimum of 128

Alexander Ziaee <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a750b5a.1cac7.29c9ab3e__44053.1973190204$1786055714$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by ziaee:

URL: https://cgit.FreeBSD.org/src/commit/?id=9bc3d8e002b96d8afd9a5f04f5d45500244f1e1b

commit 9bc3d8e002b96d8afd9a5f04f5d45500244f1e1b
Author:     Kristofer Peterson <[email protected]>
AuthorDate: 2026-03-24 14:56:48 +0000
Commit:     Alexander Ziaee <[email protected]>
CommitDate: 2026-08-06 22:26:18 +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 <[email protected]>
    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 3ca8a0bcefa7..44515d86a6cf 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -235,7 +235,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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.