diff --git a/libexec/rbenv b/libexec/rbenv index 31a2d242..66d8c438 100755 --- a/libexec/rbenv +++ b/libexec/rbenv @@ -5,8 +5,8 @@ abs_dirname() { local path="$1" while [ -n "$path" ]; do - cd "$(dirname "$path")" - local name="$(basename "$path")" + cd "${path%/*}" + local name="${path##*/}" path="$(readlink "$name" || true)" done