1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-06-13 03:32:23 +00:00

Update help/usage formatting.

This commit is contained in:
William Melody 2016-01-26 20:25:16 -08:00
parent f8564cfb2f
commit f7c7aef173
8 changed files with 33 additions and 33 deletions

View File

@ -41,7 +41,7 @@ curl -L https://raw.github.com/alphabetum/hosts/master/hosts \
```text ```text
Usage: Usage:
hosts hosts
hosts add <ip> <hostname> [comment] hosts add <ip> <hostname> [<comment>]
hosts disable (<ip> | <hostname> | <search string>) hosts disable (<ip> | <hostname> | <search string>)
hosts disabled hosts disabled
hosts edit hosts edit
@ -67,7 +67,7 @@ hosts help <command name>
## Commands ## Commands
###### `hosts add <ip> <hostname> [comment]` ###### `hosts add <ip> <hostname> [<comment>]`
Add a given IP address and hostname pair, along with an optional comment. Add a given IP address and hostname pair, along with an optional comment.

4
hosts
View File

@ -587,7 +587,7 @@ Version: $_VERSION
Usage: Usage:
$_ME $_ME
$_ME add <ip> <hostname> [comment] $_ME add <ip> <hostname> [<comment>]
$_ME disable (<ip> | <hostname> | <search string>) $_ME disable (<ip> | <hostname> | <search string>)
$_ME disabled $_ME disabled
$_ME edit $_ME edit
@ -667,7 +667,7 @@ commands() {
desc "add" <<EOM desc "add" <<EOM
Usage: Usage:
$_ME add <ip> <hostname> [comment] $_ME add <ip> <hostname> [<comment>]
Description: Description:
Add a given IP address and hostname pair, along with an optional comment. Add a given IP address and hostname pair, along with an optional comment.

View File

@ -25,7 +25,7 @@ load test_helper
printf "\$status: %s\n" "$status" printf "\$status: %s\n" "$status"
printf "\$output: '%s'\n" "$output" printf "\$output: '%s'\n" "$output"
[[ "${lines[0]}" == "Usage:" ]] [[ "${lines[0]}" == "Usage:" ]]
[[ "${lines[1]}" == " hosts add <ip> <hostname> [comment]" ]] [[ "${lines[1]}" == " hosts add <ip> <hostname> [<comment>]" ]]
} }
# `hosts add <ip>` ############################################################ # `hosts add <ip>` ############################################################
@ -52,7 +52,7 @@ load test_helper
printf "\$output: '%s'\n" "$output" printf "\$output: '%s'\n" "$output"
[[ "${lines[0]}" == "Please include a hostname" ]] [[ "${lines[0]}" == "Please include a hostname" ]]
[[ "${lines[1]}" == "Usage:" ]] [[ "${lines[1]}" == "Usage:" ]]
[[ "${lines[2]}" == " hosts add <ip> <hostname> [comment]" ]] [[ "${lines[2]}" == " hosts add <ip> <hostname> [<comment>]" ]]
} }
# `hosts add <ip> <hostname>` ################################################# # `hosts add <ip> <hostname>` #################################################
@ -123,5 +123,5 @@ load test_helper
printf "\$status: %s\n" "$status" printf "\$status: %s\n" "$status"
printf "\$output: '%s'\n" "$output" printf "\$output: '%s'\n" "$output"
[[ "${lines[0]}" == "Usage:" ]] [[ "${lines[0]}" == "Usage:" ]]
[[ "${lines[1]}" == " hosts add <ip> <hostname> [comment]" ]] [[ "${lines[1]}" == " hosts add <ip> <hostname> [<comment>]" ]]
} }