From 61d702405d9934153ba9813642a231200893c863 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/pyenv-init | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/pyenv-init b/libexec/pyenv-init index 2bf7c56a..7240b4c8 100755 --- a/libexec/pyenv-init +++ b/libexec/pyenv-init @@ -38,6 +38,7 @@ if [ -z "$shell" ]; then shell="${shell##-}" shell="${shell:-$SHELL}" shell="${shell##*/}" + shell="${shell%%-*}" fi root="${0%/*}/.."