Reformat exit status documentation.

GH-9
This commit is contained in:
William Melody 2020-04-22 11:44:01 -07:00
parent 815def022e
commit 2f5f610e3c
1 changed files with 16 additions and 8 deletions

24
hosts
View File

@ -673,7 +673,8 @@ 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.
Exit status: Exit status:
Add exits 0 on success, and 1 either an error occurs or no parameter pass. 0 Success.
1 Invalid parameters or entry exists.
HEREDOC HEREDOC
add() { add() {
_debug printf "add() \${1}: %s\\n" "${1:-}" _debug printf "add() \${1}: %s\\n" "${1:-}"
@ -763,7 +764,8 @@ Description:
Manage backups. Manage backups.
Exit status: Exit status:
Backup exits 0 on success, and 1 either an error occurs or no backup found. 0 Success.
1 Invalid parameters or backup not found.
HEREDOC HEREDOC
backups() { backups() {
local _subcommand="${1:-}" local _subcommand="${1:-}"
@ -906,7 +908,8 @@ Description:
for IPv4 and both \`fe80::1%lo0\` and \`::1\` for IPv6. for IPv4 and both \`fe80::1%lo0\` and \`::1\` for IPv6.
Exit status: Exit status:
Block exits 0 on success, and 1 either an error occurs or no parameter pass. 0 Success.
1 Invalid parameters or entry exists.
HEREDOC HEREDOC
block() { block() {
_verify_write_permissions "$@" _verify_write_permissions "$@"
@ -937,7 +940,8 @@ Description:
search string. search string.
Exit status: Exit status:
Disable exits 0 on success, and 1 either an error occurs or no parameter pass. 0 Success.
1 Invalid parameters or entry not found.
HEREDOC HEREDOC
disable() { disable() {
_verify_write_permissions "$@" _verify_write_permissions "$@"
@ -1034,7 +1038,8 @@ Description:
or search string. or search string.
Exit status: Exit status:
Enable exits 0 on success, and 1 either an error occurs or no parameter pass. 0 Success.
1 Invalid parameters or entry not found.
HEREDOC HEREDOC
enable() { enable() {
_verify_write_permissions "$@" _verify_write_permissions "$@"
@ -1175,7 +1180,8 @@ Description:
IP and hostname pair will be removed. IP and hostname pair will be removed.
Exit status: Exit status:
Remove exits 0 on success, and 1 if an error occurs or no matching records found. 0 Success.
1 Invalid parameters or entry not found.
HEREDOC HEREDOC
remove() { remove() {
_verify_write_permissions "$@" _verify_write_permissions "$@"
@ -1338,7 +1344,8 @@ Description:
Print entries matching a given IP address, hostname, or search string. Print entries matching a given IP address, hostname, or search string.
Exit status: Exit status:
Show exits 0 on success, and 1 either an error occurs or no parameter pass. 0 Success.
1 Invalid parameters.
HEREDOC HEREDOC
show() { show() {
if [[ -n "${1:-}" ]] if [[ -n "${1:-}" ]]
@ -1380,7 +1387,8 @@ Description:
Unblock one or more hostnames by removing the entries from the hosts file. Unblock one or more hostnames by removing the entries from the hosts file.
Exit status: Exit status:
Unblock exits 0 on success, and 1 either an error occurs or no parameter pass. 0 Success.
1 Invalid parameters or entry not found.
HEREDOC HEREDOC
unblock() { unblock() {
_verify_write_permissions "$@" _verify_write_permissions "$@"