From d2711cf46974d78f4b1b3c99cd0de3b0a7061abf Mon Sep 17 00:00:00 2001 From: andremarzano Date: Fri, 21 Nov 2025 16:12:31 -0300 Subject: [PATCH 1/2] Enhance crontab setup instructions for MacOS Updated crontab instructions for MacOS users to include PATH and TERM settings. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 935b2e9..0dee165 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ But if you get a response with HTML, it means that the domain is not blocked (ma Open your `cron`. ``` bash -crontab -e +sudo crontab -e ``` Add the following line at the end. @@ -119,9 +119,10 @@ Add the following line at the end. @daily maza update ``` -Some users have reported problems creating daemons on MacOS. Fixed with `TERM=dumb`. +Some users have reported problems on MacOS while creating daemons, these can be fixed by editing crontab as below: ``` +PATH=/bin:/usr/bin:/usr/local/bin:/opt/homebrew/bin TERM=dumb @daily maza update ``` From e73f7312afc2251b3824e5c0c18ad54e084c6169 Mon Sep 17 00:00:00 2001 From: andremarzano Date: Fri, 21 Nov 2025 16:14:10 -0300 Subject: [PATCH 2/2] Implement terminal color detection Add terminal color support based on output type --- maza | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/maza b/maza index cc25a73..0f8c208 100755 --- a/maza +++ b/maza @@ -11,9 +11,15 @@ THIS_OS=$(uname -mrs) PROGNAME=$(basename "$0") [[ -z "${XDG_CONFIG_HOME}" ]] && CONFIG=$HOME/.config/maza/ || CONFIG=$XDG_CONFIG_HOME/maza/ HOST_FILE=/etc/hosts -COLOR_RED=$(tput setaf 1) -COLOR_GREEN=$(tput setaf 2) -COLOR_RESET=$(tput sgr0) +if [ -t 1 ]; then + COLOR_RED=$(tput setaf 1 2>/dev/null || true) + COLOR_GREEN=$(tput setaf 2 2>/dev/null || true) + COLOR_RESET=$(tput sgr0 2>/dev/null || true) +else + COLOR_RED="" + COLOR_GREEN="" + COLOR_RESET="" +fi LIST="list" LIST_DNSMASQ="dnsmasq.conf" CUSTOM_DOMAINS="custom-domains"