From 305cca74cbc742927980e161a27a186d16019743 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. --- bin/pyenv-virtualenv-init | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/pyenv-virtualenv-init b/bin/pyenv-virtualenv-init index a24a785..e12769a 100755 --- a/bin/pyenv-virtualenv-init +++ b/bin/pyenv-virtualenv-init @@ -45,6 +45,7 @@ if [ -z "$shell" ]; then shell="${shell%% *}" shell="${shell:-$SHELL}" shell="${shell##*/}" + shell="${shell%%-*}" fi if [ -z "$print" ]; then