From c928ba7a210039e288abd548348457fc911ad92d Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 6 Sep 2011 22:07:05 -0500 Subject: [PATCH] Include sh commands in default listing --- libexec/rbenv-commands | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libexec/rbenv-commands b/libexec/rbenv-commands index 08c5a944..4b593b4b 100755 --- a/libexec/rbenv-commands +++ b/libexec/rbenv-commands @@ -6,6 +6,11 @@ if [ "$1" = "--sh" ]; then shift fi +if [ "$1" = "--no-sh" ]; then + nosh=1 + shift +fi + shopt -s nullglob { for path in ${PATH//:/$'\n'}; do @@ -15,12 +20,13 @@ shopt -s nullglob if [ ${command:0:3} = "sh-" ]; then echo ${command##sh-} fi - else + elif [ -n "$nosh" ]; then if [ ${command:0:3} != "sh-" ]; then - echo $command + echo ${command##sh-} fi + else + echo ${command##sh-} fi done done } | sort | uniq -