mirror of https://github.com/octoleo/hosts.git
Add `enabled` and `disabled` commands.
Both of these are just aliases for the `list ( enabled | disabled )` commands, providing a shorter way to access the same functionality.
This commit is contained in:
parent
52529dd029
commit
7e32a799c2
10
Readme.md
10
Readme.md
|
@ -21,7 +21,9 @@ To install with homebrew, use the following command:
|
||||||
hosts list [enabled | disabled | <search string>]
|
hosts list [enabled | disabled | <search string>]
|
||||||
hosts show ( <ip> | <hostname> | <search string> )
|
hosts show ( <ip> | <hostname> | <search string> )
|
||||||
hosts disable ( <ip> | <hostname> | <search string> )
|
hosts disable ( <ip> | <hostname> | <search string> )
|
||||||
|
hosts disabled
|
||||||
hosts enable ( <ip> | <hostname> | <search string> )
|
hosts enable ( <ip> | <hostname> | <search string> )
|
||||||
|
hosts enabled
|
||||||
hosts edit
|
hosts edit
|
||||||
hosts file
|
hosts file
|
||||||
|
|
||||||
|
@ -60,11 +62,19 @@ Print entries matching a given IP address, hostname, or search string.
|
||||||
Disable one or more records based on a given ip address, hostname, or
|
Disable one or more records based on a given ip address, hostname, or
|
||||||
search string.
|
search string.
|
||||||
|
|
||||||
|
###### `hosts disabled`
|
||||||
|
|
||||||
|
List all disabled records. This is an alias for `hosts list disabled`.
|
||||||
|
|
||||||
###### `hosts enable ( <ip> | <hostname> | <search string> )`
|
###### `hosts enable ( <ip> | <hostname> | <search string> )`
|
||||||
|
|
||||||
Enable one or more disabled records based on a given ip address, hostname,
|
Enable one or more disabled records based on a given ip address, hostname,
|
||||||
or search string.
|
or search string.
|
||||||
|
|
||||||
|
###### `hosts enabled`
|
||||||
|
|
||||||
|
List all enabled records. This is an alias for `hosts list enabled`.
|
||||||
|
|
||||||
###### `hosts edit`
|
###### `hosts edit`
|
||||||
|
|
||||||
Open the hosts file (/etc/hosts) file in your editor.
|
Open the hosts file (/etc/hosts) file in your editor.
|
||||||
|
|
26
hosts
26
hosts
|
@ -621,6 +621,19 @@ disable() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------- disabled
|
||||||
|
|
||||||
|
desc disabled <<EOM
|
||||||
|
Usage:
|
||||||
|
$_me disabled
|
||||||
|
|
||||||
|
Description:
|
||||||
|
List all disabled records. This is an alias for \`hosts list disabled\`.
|
||||||
|
EOM
|
||||||
|
disabled() {
|
||||||
|
$_me list disabled
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------ edit
|
# ------------------------------------------------------------------------ edit
|
||||||
|
|
||||||
desc edit <<EOM
|
desc edit <<EOM
|
||||||
|
@ -665,6 +678,19 @@ enable() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------- enabled
|
||||||
|
|
||||||
|
desc enabled <<EOM
|
||||||
|
Usage:
|
||||||
|
$_me enabled
|
||||||
|
|
||||||
|
Description:
|
||||||
|
List all enabled records. This is an alias for \`hosts list enabled\`.
|
||||||
|
EOM
|
||||||
|
enabled() {
|
||||||
|
$_me list enabled
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------ file
|
# ------------------------------------------------------------------------ file
|
||||||
|
|
||||||
desc file <<EOM
|
desc file <<EOM
|
||||||
|
|
Loading…
Reference in New Issue