From 7e32a799c21804e0ff99623caa79d673342446f4 Mon Sep 17 00:00:00 2001 From: William Melody Date: Fri, 20 Mar 2015 16:44:43 -0700 Subject: [PATCH] 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. --- Readme.md | 10 ++++++++++ hosts | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Readme.md b/Readme.md index d45617f..4be8426 100644 --- a/Readme.md +++ b/Readme.md @@ -21,7 +21,9 @@ To install with homebrew, use the following command: hosts list [enabled | disabled | ] hosts show ( | | ) hosts disable ( | | ) + hosts disabled hosts enable ( | | ) + hosts enabled hosts edit 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 search string. +###### `hosts disabled` + +List all disabled records. This is an alias for `hosts list disabled`. + ###### `hosts enable ( | | )` Enable one or more disabled records based on a given ip address, hostname, or search string. +###### `hosts enabled` + +List all enabled records. This is an alias for `hosts list enabled`. + ###### `hosts edit` Open the hosts file (/etc/hosts) file in your editor. diff --git a/hosts b/hosts index 7ad7680..c3de37c 100755 --- a/hosts +++ b/hosts @@ -621,6 +621,19 @@ disable() { fi } +# -------------------------------------------------------------------- disabled + +desc disabled <