From 4ea7d0849be6d0383ddd6c95301b5f028e2cc59b Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 10 May 2015 16:17:35 +0200 Subject: [PATCH] rbenv-init: do not use basename for $shell This can be done using bash directly. --- libexec/rbenv-init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rbenv-init b/libexec/rbenv-init index 0b2c13aa..83521d37 100755 --- a/libexec/rbenv-init +++ b/libexec/rbenv-init @@ -25,7 +25,8 @@ if [ -z "$shell" ]; then shell="$(ps c -p "$PPID" -o 'ucomm=' 2>/dev/null || true)" shell="${shell##-}" shell="${shell%% *}" - shell="$(basename "${shell:-$SHELL}")" + shell="${shell:-$SHELL}" + shell="${shell##*/}" fi root="${0%/*}/.."