1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-11 21:13:46 -05:00

help: have --usage always print a usage line

This commit is contained in:
Mislav Marohnić
2023-07-11 18:54:38 +02:00
parent af9201ea1e
commit 592fe6a087
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