From: rhatto Date: Fri, 14 Mar 2014 16:37:51 +0000 (-0300) Subject: Make usage more readable X-Git-Tag: 0.3.2~4 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=c26e7a4cb2b5b88bca604ed9a0fb16bfc10b20b4;p=keyringer.git Make usage more readable --- diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 0b084af..e0cccec 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -519,14 +519,18 @@ function keyringer_usage { printf "Keyringer $KEYRINGER_VERSION\n" printf "Usage: %s [arguments]\n\n" "$BASENAME" - printf "Available actions: \n\n" - keyringer_show_actions | sed -e 's/^/\t/' # Display only when not in a keyring context if [ ! -z "$keyrings" ] && [ -z "$1" ]; then - printf "\tinit [remote]\n\n" $BASENAME printf "Available keyrings: %s \n" "$keyrings" fi + + # Show available actions + printf "Available actions: \n\n" + if [ ! -z "$keyrings" ] && [ -z "$1" ]; then + printf "\tinit [remote]\n" $BASENAME + fi + keyringer_show_actions | sed -e 's/^/\t/' } # Check repository integrity