From 920ef1456ad6728a42677e093686f3a05aa70047 Mon Sep 17 00:00:00 2001 From: Kevin Schoedel <67607049+kpschoedel@users.noreply.github.com> Date: Fri, 12 May 2023 18:24:57 -0400 Subject: [PATCH] Support ksh alternative names (#2697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- libexec/pyenv-init | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libexec/pyenv-init b/libexec/pyenv-init index 8bc8bc36..c1e0da7b 100755 --- a/libexec/pyenv-init +++ b/libexec/pyenv-init @@ -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 <