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.
This commit is contained in:
William Melody 2015-11-23 11:16:03 -08:00
parent 59e404f865
commit 21069fb68d
1 changed files with 2 additions and 2 deletions

4
hosts
View File

@ -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