NetBSD Problem Report #60245
From www@netbsd.org Sun May 10 09:41:06 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id C9CD81A9239
for <gnats-bugs@gnats.NetBSD.org>; Sun, 10 May 2026 09:41:05 +0000 (UTC)
Message-Id: <20260510094104.B084B1A923A@mollari.NetBSD.org>
Date: Sun, 10 May 2026 09:41:04 +0000 (UTC)
From: rvp@SDF.ORG
Reply-To: rvp@SDF.ORG
To: gnats-bugs@NetBSD.org
Subject: ksh93: hist() defined in the system kshrc is unnecessary.
X-Send-Pr-Version: www-1.0
X-From4GNATS: "rvp@SDF.ORG via gnats" <gnats-admin@NetBSD.org>
>Number: 60245
>Category: pkg
>Synopsis: ksh93: hist() defined in the system kshrc is unnecessary.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun May 10 09:45:00 +0000 2026
>Originator: RVP
>Release: pkgsrc-2026Q1
>Organization:
>Environment:
NetBSD/amd64 11.99.6
>Description:
There is a hist() function defined in the system-wide `kshrc` file:
https://github.com/NetBSD/pkgsrc/blob/trunk/shells/ksh93/files/kshrc#L57
which overrides the built-in command of the same name and causes issues
like this:
https://mail-index.netbsd.org/current-users/2026/05/10/msg047602.html
1. If you use `fc -l`, then you have to use `sort -n`. (And then of course
piping further to `uniq` is pointless.)
2. If you change it to `fc -n`, then the pipeline is correct, but, now
you can't recall history based on line numbers.
>How-To-Repeat:
See mail from user `chytraeu` on current-users@
>Fix:
Change or get rid of hist().
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.