1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-12 13:33:45 -05:00

foundation for a help system where each command holds its own docs

Docs are comprised from "Usage", "Summary" and "Help" sections, where
"Help" can span multiple commented lines. If it is missing, "Summary" is
shown in its place.

References #204, references #206
This commit is contained in:
Mislav Marohnić
2012-12-13 05:48:28 +01:00
parent 7fe9231e64
commit b8715bfee6
6 changed files with 63 additions and 37 deletions

View File

@@ -1,4 +1,8 @@
#!/usr/bin/env bash
# Usage: rbenv which COMMAND
# Summary: Display full path to a binary
# Help: Displays the full path to the binary that rbenv will execute when you
# run the given command.
set -e
[ -n "$RBENV_DEBUG" ] && set -x
@@ -44,7 +48,7 @@ RBENV_VERSION="$(rbenv-version-name)"
RBENV_COMMAND="$1"
if [ -z "$RBENV_COMMAND" ]; then
echo "usage: rbenv which COMMAND" >&2
rbenv-help which | head -1 >&2
exit 1
fi