A simpler implementation of "usage"

pull/48/head
Anton Maklakov 8 years ago
parent 00deabb0e3
commit a9e4f8f111

@ -26,14 +26,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