mirror of
https://github.com/rbenv/rbenv.git
synced 2024-12-29 13:15:42 +01:00
Make the usage syntax for arbitrary args consistent (#1447)
This commit is contained in:
parent
172a79e993
commit
3e5347be1e
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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:"
|
||||
|
|
|
@ -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" {
|
||||
|
|
Loading…
Reference in a new issue