aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-06-13 13:52:41 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-06-13 13:52:41 +0200
commite6f7318a6ca2681c7abb4a4476d188cc3a0ae497 (patch)
treef5e1aabc2e89bec2966e6421532c309f044dd532
parent4ac581b13113bd7e13b438f52c3f28b18b95bfae (diff)
downloadmblaze-e6f7318a6ca2681c7abb4a4476d188cc3a0ae497.tar.gz
mcolor: normalize CRLF
-rwxr-xr-xmcolor1
1 files changed, 1 insertions, 0 deletions
diff --git a/mcolor b/mcolor
index ec07e31..2712db3 100755
--- a/mcolor
+++ b/mcolor
@@ -6,6 +6,7 @@ function fg(c, s) { return sprintf("\033[38;5;%03dm%s\033[0m", c, s) }
function so(s) { return sprintf("\033[1m%s\033[0m", s) }
BEGIN { hdr = 1; if (match(ENVIRON["TERM"], "^(dumb|network|9term)")) dumb = 1 }
dumb { print; next }
+/\r$/ { sub(/\r$/, "") }
/^\014$/ { nextmail = 1; next }
/^$/ { hdr = 0 }
/^-- $/ { ftr = 1 }