From 1ebcbd92e2d28a9ade5174b7a22a9f3d7d9f3e71 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Thu, 13 Dec 2012 11:22:06 -0600 Subject: [PATCH] Tweak `rbenv --version` output --- libexec/rbenv | 2 +- libexec/rbenv---version | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libexec/rbenv b/libexec/rbenv index d368d459..76928647 100755 --- a/libexec/rbenv +++ b/libexec/rbenv @@ -60,7 +60,7 @@ shopt -u nullglob command="$1" case "$command" in "" | "-h" | "--help" ) - echo -e "rbenv $(rbenv---version)\n$(rbenv-help)" >&2 + echo -e "$(rbenv---version)\n$(rbenv-help)" >&2 ;; "-v" ) exec rbenv---version diff --git a/libexec/rbenv---version b/libexec/rbenv---version index fcf94d69..aa9b829d 100755 --- a/libexec/rbenv---version +++ b/libexec/rbenv---version @@ -2,9 +2,10 @@ set -e [ -n "$RBENV_DEBUG" ] && set -x -version=v0.3.0 +version=0.3.0 cd "$RBENV_ROOT" git_revision="$(git describe --tags HEAD 2>/dev/null || true)" +git_revision="${git_revision#v}" -echo ${git_revision:-$version} +echo "rbenv ${git_revision:-$version}"