From 21069fb68dab16d30484620199009b9ce912cafd Mon Sep 17 00:00:00 2001 From: William Melody Date: Mon, 23 Nov 2015 11:16:03 -0800 Subject: [PATCH] Add quotes around strings in `list` command argument tests. Quoting these strings more clearly communicates that these are not variable or function names, and that the string itself is what is being tested for. --- hosts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts b/hosts index 6c25ac1..1a06dda 100755 --- a/hosts +++ b/hosts @@ -907,10 +907,10 @@ list() { if [[ -n "$1" ]] then - if [[ "$1" == disabled ]] + if [[ "$1" == "disabled" ]] then printf "%s\n" "${disabled_records}" - elif [[ "$1" == enabled ]] + elif [[ "$1" == "enabled" ]] then grep -v -e '^$' -e '^\s*\#' "${HOSTS_PATH}" else