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

Loading…
Cancel
Save