about summary refs log tree commit diff
path: root/mless
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-01-29 15:38:41 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-01-29 15:38:41 +0100
commit671bceec51858cf18d86c5de2357a1771b8628c7 (patch)
tree0e6b7160201c190e7b4c956b368229f2abdf6d0c /mless
parent4014f03afe6d624ba1c6bdde6551b4996ba31fe5 (diff)
downloadmblaze-671bceec51858cf18d86c5de2357a1771b8628c7.tar.gz
mblaze-671bceec51858cf18d86c5de2357a1771b8628c7.tar.xz
mblaze-671bceec51858cf18d86c5de2357a1771b8628c7.zip
mless: support $NO_COLOR
http://no-color.org/
Diffstat (limited to 'mless')
-rwxr-xr-xmless4
1 files changed, 4 insertions, 0 deletions
diff --git a/mless b/mless
index 395a8f8..91391ed 100755
--- a/mless
+++ b/mless
@@ -11,6 +11,10 @@ function so(s) { return sprintf("\033[1m%s\033[0m", s) }
 { print }'
 }
 
+if [ -n "${NO_COLOR+set}" ]; then
+	colorscan() { cat -; }
+fi
+
 if [ "$1" = --filter ]; then
 	if [ "$2" = //scan ]; then
 		mscan : 2>/dev/null | colorscan