pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/60245: ksh93: hist() defined in the system kshrc is unnecessary.



>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().




Home | Main Index | Thread Index | Old Index