rbenv-init: do not use basename for $shell

This can be done using bash directly.
This commit is contained in:
Daniel Hahler 2015-05-10 16:17:35 +02:00
parent 5b9e4f0584
commit 4ea7d0849b

View file

@ -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%/*}/.."