mirror of
https://github.com/octoleo/hosts.git
synced 2025-04-06 23:41:51 +00:00
Update help/usage formatting.
This commit is contained in:
parent
f8564cfb2f
commit
f7c7aef173
@ -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
4
hosts
@ -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.
|
||||||
|
@ -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>]" ]]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user