From c5b2465fb0880e31807327ba7ad835b75fb48c34 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 6 May 2023 16:25:51 -1000 Subject: [PATCH] ;imp: hledger-bar: disable ANSI if terminal is non-interactive --- bin/hledger-bar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/hledger-bar b/bin/hledger-bar index 82784545f..c2c74c85c 100755 --- a/bin/hledger-bar +++ b/bin/hledger-bar @@ -76,7 +76,7 @@ poschar="+" # utils # https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit and 24-bit colors: -if [[ -v $NO_COLOR ]]; then +if [[ $- != *i* || -v $NO_COLOR ]]; then red='' green='' nocol=''