Support ksh alternative names (#2697)

* Support ksh versions

Korn shell had two major versions: ’88 and ’93. Some systems have
ksh installed under the name `ksh93`. A few systems (maybe only
Solaris now) also have a `ksh88`. A few others use the `pdksh` (’88)
or `mksh` (’93) implementations, originated before ksh was open source.

Limit to currently-used versions

---------

Co-authored-by: Kevin Schoedel <kps@datatravelandexperiments.com>
This commit is contained in:
Kevin Schoedel 2023-05-12 18:24:57 -04:00 committed by GitHub
parent 528d10e96f
commit 920ef1456a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,7 +109,12 @@ function detect_profile() {
profile='~/.zprofile'
rc='~/.zshrc'
;;
ksh )
ksh | ksh93 | mksh )
# There are two implementations of Korn shell: AT&T (ksh93) and Mir (mksh).
# Systems may have them installed under those names, or as ksh, so those
# are recognized here. The obsolete ksh88 (subsumed by ksh93) and pdksh
# (subsumed by mksh) are not included, since they are unlikely to still
# be in use as interactive shells anywhere.
profile='~/.profile'
rc='~/.profile'
;;
@ -269,7 +274,7 @@ function pyenv
end
EOS
;;
ksh )
ksh | ksh93 | mksh )
cat <<EOS
function pyenv {
typeset command