A simpler implementation of "usage"

pull/42/merge
Anton Maklakov 8 years ago committed by sobolevn
parent c7ac7ad211
commit c6a13cf405
No known key found for this signature in database
GPG Key ID: FF672D568AE3C73E

@ -13,14 +13,7 @@ function usage {
shift $((OPTIND-1)) shift $((OPTIND-1))
[ "$1" = "--" ] && shift [ "$1" = "--" ] && shift
local commands="" local commands="add|changes|clean|hide|init|killperson|list|remove|reveal|tell|usage|whoknows"
local separator="|"
for com in $(compgen -A function); do echo "usage: git secret [${commands}]"
if [[ ! $com == _* ]]; then
commands+="$com$separator"
fi
done
echo "usage: git secret [${commands%?}]"
} }

Loading…
Cancel
Save