Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-07-18 20:58:32 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-18 20:58:32 +0300
commit7f25a1f00e10f606c008e442a6c5574ea2e82a66 (patch)
tree2a414a00fe31a37d6d9c6e19b2f487c2872b055b /include/helper_show
parentd5890b8a753df6985878d4fae69c9fa5e164a2b8 (diff)
Remove colors properly with one function (contribution: Mike Slifcak at Pindrop
Diffstat (limited to 'include/helper_show')
-rw-r--r--include/helper_show4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/helper_show b/include/helper_show
index 2a9ef418..9338a4ed 100644
--- a/include/helper_show
+++ b/include/helper_show
@@ -200,7 +200,7 @@ if [ $# -gt 0 ]; then
case $1 in
"--brief" | "--br") BRIEF_OUTPUT=1 ;;
"--configured-only" | "--co") CONFIGURED_ONLY_OUTPUT=1 ;;
- "--nocolors" | "--nc") COLORED_OUTPUT=0 ;;
+ "--nocolors" | "--no-colors" | "--nc") COLORED_OUTPUT=0; COLORS=0 ;;
*)
${ECHOCMD} "${RED}Error${NORMAL}: Invalid argument provided to 'lynis show settings'\n\n"
${ECHOCMD} "Suggestions:"
@@ -209,7 +209,7 @@ if [ $# -gt 0 ]; then
;;
esac
done
- if [ ${COLORED_OUTPUT} -eq 0 ]; then BLUE=""; CYAN=""; GRAY=""; WHITE=""; fi
+ if [ ${COLORED_OUTPUT} -eq 0 ]; then RemoveColors; fi
# Sort all settings and display them
SETTINGS=$(sort ${SETTINGS_FILE} | sed 's/ /:space:/g')
for LINE in ${SETTINGS}; do