From 45951d2cbbdfb22fe069d5f935512335af27b8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 1 Mar 2021 07:49:47 +0200 Subject: [PATCH] feat(init): strip - when autodetecting shell For example bash-5.1, bash-static. --- libexec/rbenv-init | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rbenv-init b/libexec/rbenv-init index cd327fad..acc9e40d 100755 --- a/libexec/rbenv-init +++ b/libexec/rbenv-init @@ -38,6 +38,7 @@ if [ -z "$shell" ]; then shell="${shell##-}" shell="${shell:-$SHELL}" shell="${shell##*/}" + shell="${shell%%-*}" fi root="${0%/*}/.."