Make the usage syntax for arbitrary args consistent (#1447)

This commit is contained in:
Mislav Marohnić 2022-10-09 14:49:15 +02:00 committed by GitHub
parent 172a79e993
commit 3e5347be1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Usage: rbenv completions <command> [arg1 arg2...]
# Usage: rbenv completions <command> [<args>...]
set -e
[ -n "$RBENV_DEBUG" ] && set -x

View file

@ -157,7 +157,7 @@ if [ -z "$1" ] || [ "$1" == "rbenv" ]; then
if [ -z "$usage" ] && [ -t 1 ] && type -P man >/dev/null; then
MANPATH="${BASH_SOURCE%/*}/../share/man:$MANPATH" exec man rbenv
fi
echo "Usage: rbenv <command> [<args>]"
echo "Usage: rbenv <command> [<args>...]"
[ -n "$usage" ] && exit
echo
echo "Some useful rbenv commands are:"

View file

@ -5,14 +5,14 @@ load test_helper
@test "without args shows summary of common commands" {
run rbenv-help
assert_success
assert_line "Usage: rbenv <command> [<args>]"
assert_line "Usage: rbenv <command> [<args>...]"
assert_line "Some useful rbenv commands are:"
}
@test "usage flag" {
run rbenv-help --usage
assert_success
assert_output "Usage: rbenv <command> [<args>]"
assert_output "Usage: rbenv <command> [<args>...]"
}
@test "invalid command" {