Remover requirement of passing args to help-line

This commit is contained in:
2021-12-21 11:19:51 -08:00
parent 4c54a238d8
commit b62ef700f4
4 changed files with 15 additions and 14 deletions

5
View File

@@ -24,7 +24,8 @@ redefine-functions-defined-with-selector-16() {
}
⚡help() {
_help-line "Show this list" "$@"
_help-line "Show this list"
export HELP_LINE=please
echo Usage: "$0" SUBCOMMAND
echo
echo "Available subcommands:"
@@ -47,7 +48,7 @@ _subcommands() {
}
_help-line() {
if [[ "$#" == 2 && "$2" == "help-line" ]]; then
if [[ "${HELP_LINE:-}" == "please" ]]; then
echo "$1" && exit 0
fi
}