From e390b228c8be53ffa6b02bd06cad2189e5105024 Mon Sep 17 00:00:00 2001 From: Kevin Schoedel Date: Thu, 11 May 2023 12:23:34 -0400 Subject: [PATCH 1/2] Support ksh versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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` (roughly ’88) or `mksh` (roughly ’93) implementations, originated before ksh was open source. As far as the (very minor) use in rbenv is concerned, these are all equivalent. This change accepts all of the above. Tested with `ksh93`, `pdksh`, and `mksh`. --- libexec/rbenv-init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rbenv-init b/libexec/rbenv-init index ff79b3db..e4b487e7 100755 --- a/libexec/rbenv-init +++ b/libexec/rbenv-init @@ -62,7 +62,7 @@ if [ -z "$print" ]; then zsh ) profile='~/.zshrc' ;; - ksh ) + ksh | ksh93 | ksh88 | pdksh | mksh ) profile='~/.profile' ;; fish ) @@ -144,7 +144,7 @@ function rbenv end EOS ;; -ksh ) +ksh | ksh93 | ksh88 | pdksh | mksh ) cat < Date: Sat, 13 May 2023 12:56:22 -0400 Subject: [PATCH 2/2] Add explanatory comment, and remove obsolete versions --- libexec/rbenv-init | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libexec/rbenv-init b/libexec/rbenv-init index e4b487e7..7b944d21 100755 --- a/libexec/rbenv-init +++ b/libexec/rbenv-init @@ -62,7 +62,12 @@ if [ -z "$print" ]; then zsh ) profile='~/.zshrc' ;; - ksh | ksh93 | ksh88 | pdksh | mksh ) + 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' ;; fish ) @@ -144,7 +149,7 @@ function rbenv end EOS ;; -ksh | ksh93 | ksh88 | pdksh | mksh ) +ksh | ksh93 | mksh ) cat <