Bladeren bron

display help for commands that have Summary but not Usage

A command doesn't have to specify Usage docs if it doesn't accept any
arguments. The default usage for a command will be printed as:

    Usage: rbenv ${command}
pull/360/head^2
Mislav Marohnić 13 jaren geleden
bovenliggende
commit
2b21e22e97
2 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. +6
    -2
      libexec/rbenv-help
  2. +0
    -1
      libexec/rbenv-rehash

+ 6
- 2
libexec/rbenv-help Bestand weergeven

@ -97,8 +97,12 @@ print_help() {
eval "$(documentation_for "$command")"
[ -n "$help" ] || help="$summary"
if [ -n "$usage" ]; then
echo "$usage"
if [ -n "$usage" -o -n "$summary" ]; then
if [ -n "$usage" ]; then
echo "$usage"
else
echo "Usage: rbenv ${command}"
fi
if [ -n "$help" ]; then
echo
echo "$help"

+ 0
- 1
libexec/rbenv-rehash Bestand weergeven

@ -1,6 +1,5 @@
#!/usr/bin/env bash
# Summary: Rehash rbenv shims (run this after installing binaries)
# Usage: rbenv rehash
set -e
[ -n "$RBENV_DEBUG" ] && set -x

Laden…
Annuleren
Opslaan