mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 13:33:45 -05:00
add --help to subcommand completions
ensure subcommand exists, then include --help in its completion output
This commit is contained in:
@@ -11,6 +11,10 @@ if [ -z "$COMMAND" ]; then
|
||||
fi
|
||||
|
||||
COMMAND_PATH="$(command -v "rbenv-$COMMAND" || command -v "rbenv-sh-$COMMAND")"
|
||||
|
||||
# --help is provided automatically
|
||||
echo --help
|
||||
|
||||
if grep -iE "^([#%]|--|//) provide rbenv completions" "$COMMAND_PATH" >/dev/null; then
|
||||
shift
|
||||
exec "$COMMAND_PATH" --complete "$@"
|
||||
|
||||
Reference in New Issue
Block a user