mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
;fix: hledger-bar: detect non-interactive output properly for ANSI
This commit is contained in:
parent
57c0205107
commit
705c1bec93
@ -75,8 +75,9 @@ poschar="+"
|
||||
|
||||
# utils
|
||||
|
||||
# https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit and 24-bit colors:
|
||||
if [[ $- != *i* || -v $NO_COLOR ]]; then
|
||||
# https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit and 24-bit colors.
|
||||
# Disable if stdout is not a terminal or NO_COLOR is defined.
|
||||
if [[ ! -t 1 || -v $NO_COLOR ]]; then
|
||||
red=''
|
||||
green=''
|
||||
nocol=''
|
||||
|
Loading…
Reference in New Issue
Block a user