From 85e75dbab3db4cf8c67072c170280a5c6716e2ff Mon Sep 17 00:00:00 2001 From: Mitchell Pomery Date: Sun, 27 Nov 2022 05:39:18 +1100 Subject: [PATCH] Make text colour work in MacOS zsh (#450) --- hooks/_common.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/_common.sh b/hooks/_common.sh index 6bc8679..37b32d8 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -256,13 +256,13 @@ function common::per_dir_hook { ####################################################################### function common::colorify { # shellcheck disable=SC2034 - local -r red="\e[0m\e[31m" + local -r red="\x1b[0m\x1b[31m" # shellcheck disable=SC2034 - local -r green="\e[0m\e[32m" + local -r green="\x1b[0m\x1b[32m" # shellcheck disable=SC2034 - local -r yellow="\e[0m\e[33m" + local -r yellow="\x1b[0m\x1b[33m" # Color reset - local -r RESET="\e[0m" + local -r RESET="\x1b[0m" # Params start # local COLOR="${!1}"