about summary refs log tree commit diff
path: root/mcolor
diff options
context:
space:
mode:
Diffstat (limited to 'mcolor')
-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 }