1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 15:23:53 -05:00

Merge pull request #1515 from rbenv/help-usage

help: have `--usage` always print a usage line
This commit is contained in:
Mislav Marohnić
2023-07-14 23:29:47 +02:00
committed by GitHub
2 changed files with 17 additions and 1 deletions

View File

@@ -144,7 +144,11 @@ print_usage() {
local command="$1"
local summary usage help
eval "$(documentation_for "$command")"
[ -z "$usage" ] || echo "$usage"
if [ -n "$usage" ]; then
echo "$usage"
else
echo "Usage: rbenv ${command}"
fi
}
unset usage