mirror of
https://github.com/octoleo/hosts.git
synced 2025-01-01 05:31:49 +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" "${*}"
|
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()
|
# _blank()
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
@ -648,7 +632,7 @@ Description:
|
|||||||
Display the list of available commands.
|
Display the list of available commands.
|
||||||
HEREDOC
|
HEREDOC
|
||||||
commands() {
|
commands() {
|
||||||
if _command_argv_includes "--raw"
|
if [[ "${1:-}" == "--raw" ]]
|
||||||
then
|
then
|
||||||
printf "%s\\n" "${_DEFINED_COMMANDS[@]}"
|
printf "%s\\n" "${_DEFINED_COMMANDS[@]}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user