mirror of
https://github.com/octoleo/hosts.git
synced 2024-12-29 12:32:44 +00:00
Remove obsolete _command_argv_includes()
.
This commit is contained in:
parent
952e2465b3
commit
4aeab14d2d
18
hosts
18
hosts
@ -338,22 +338,6 @@ _join() {
|
||||
printf "%s\\n" "${*}"
|
||||
}
|
||||
|
||||
# _command_argv_includes()
|
||||
#
|
||||
# Usage:
|
||||
# _command_argv_includes "an_argument"
|
||||
#
|
||||
# Exit Status:
|
||||
# 0 If the argument is included in `$_COMMAND_ARGV`, the program's command
|
||||
# argument list.
|
||||
# 1 If not.
|
||||
#
|
||||
# This is a shortcut for simple cases where a command wants to check for the
|
||||
# presence of options quickly without parsing the options again.
|
||||
_command_argv_includes() {
|
||||
_contains "${1}" "${_COMMAND_ARGV[*]}"
|
||||
}
|
||||
|
||||
# _blank()
|
||||
#
|
||||
# Usage:
|
||||
@ -648,7 +632,7 @@ Description:
|
||||
Display the list of available commands.
|
||||
HEREDOC
|
||||
commands() {
|
||||
if _command_argv_includes "--raw"
|
||||
if [[ "${1:-}" == "--raw" ]]
|
||||
then
|
||||
printf "%s\\n" "${_DEFINED_COMMANDS[@]}"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user