Changes in ksh2020?

148 views
Skip to first unread message

Jeffery Small

unread,
Mar 5, 2021, 7:00:35 PM3/5/21
to Korn Shell
Xubuntu 20.04
Ksh using vi editing mode

I've used ksh for 40+ years now,  I recently noticed a change in behavior dating back a few months.  Only today did I discover that I'm using ksh2020 (never heard of it before!) rather than ksh93 which is what I had the last time I looked.  Ksh93 is no longer listed in the synaptic package manager list.

My issue is that now, when you type a command that has a syntax error, the command is NOT added to the command history, and therefore, it isn't available to recall for editing.  For example:

169-> for i in * do echo $i ; done
ksh: syntax error: `done' unexpected
169->

i intentionally left off the semicolon before the "do" and the command fails.  But you can see that the history number has not incremented and the command cannot be recalled to be edited.  This is not what used to happen and violates 40 years of editing muscle memory!

Is there a method of getting these commands back onto the history list?  I hope so!  :-)

Thanks for any insights you can offer.

Jeffery Small

unread,
Mar 5, 2021, 7:09:13 PM3/5/21
to Korn Shell
P.S.:  If ksh93 is still available, why doesn't it show up in synaptic?

Screenshot_2021-03-05_16-07-29.png

Andras Farkas

unread,
Mar 5, 2021, 8:36:07 PM3/5/21
to Jeffery Small, Korn Shell
At one point, a few people de facto hijacked the AT&T github for
KornShell and made a buggy ksh2020 out of ksh93v-. Some OSes and
distros (unfortunately) switched to their ksh2020 from ksh93u+.
Eventually, AT&T took control over the GitHub repository again moved
it back to ksh93u+.
Some distros have moved the ksh package back to ksh93u+ and you should
encourage yours to do so.

At the very least, there should be separate ksh93 and ksh2020
packages. ksh2020 isn't a successor for ksh93 despite the similar
names.
That advice is what you should direct at Xubuntu, that you'd like
ksh93u+ back and that no-one is supporting, maintaining, or developing
ksh2020 (to my knowledge at least, which may be wrong!)
Of course, ksh93u+ itself isn't maintained or developed either, but it
works better.
There's also a promising fork of ksh93u+ that IS being developed:
https://github.com/ksh93/ksh

Your issue is a distro/packaging issue. Not sure whether you should
contact Xubuntu, Ubuntu, or Debian, but probably Xubuntu first.

Preliminary research shows this might be fixed in 20.10 (in which case
your problem might be fixed by upgrading)
https://packages.ubuntu.com/groovy/ksh
"2020.0.0+really93u+20120801-8"
> really93u+
If that's true, it should be easy to fix. :D

Marc Wilson

unread,
Mar 5, 2021, 9:40:50 PM3/5/21
to Korn Shell
Ubuntu does ship ksh93.

[41] ubuntu $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

[42] ubuntu $ apt-cache search ksh | grep ^ksh
ksh - 2020 version of the AT&T Korn Shell
ksh93 - Real, AT&T version of the Korn shell
kshisen - Shisen-Sho solitaire game
kshutdown - advanced shut down utility for KDE

[43] ubuntu $ apt list ksh
Listing... Done
ksh/focal 2020.0.0-5 amd64

[44] ubuntu $ apt list ksh93
Listing... Done
ksh93/focal,now 93u+20120801-7 amd64 [installed]

Jeffery Small

unread,
Mar 6, 2021, 1:44:54 PM3/6/21
to Korn Shell
Thanks for all the info.  I will try to track down the package maintainer and register the problem.  I will also try to reinstall ksh93.

Thanks for the help.

Jeffery Small

unread,
Mar 6, 2021, 2:12:49 PM3/6/21
to Korn Shell
I did reinstall ksh93 and all is well!  Thanks again for the great information.

Marc Wilson

unread,
Mar 7, 2021, 2:08:43 PM3/7/21
to Korn Shell
You might think about installing ksh93u+m, there are many bug fixes. :)  It builds easily on Ubuntu with clang.

Reply all
Reply to author
Forward
0 new messages