Re: [PATCH] Added contrib/ratdate.sh and updated Makefile.am
Rob Paisley <paisley-fBzVes0d2/ZWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.window-managers.ratpoison.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Dec 05, 2013 at 12:34:22AM +0100, J??r??mie Courr??ges-Anglas wrote: > > Note that the :alnum: ctype(3) is used to remove highlighting of today's date > > with versions of cal which do that. > > Do you know of any cal(1) implementation that outputs ansi escape chars > when stdout isn't a terminal? Both FreeBSD's cal and Ubuntu Linux's cal implementation seem to produce escape characters when output is a pipe as follows: $ cal | xxd 0000000: 2020 2044 6563 656d 6265 7220 3230 3133 December 2013 0000010: 2020 2020 2020 0a53 7520 4d6f 2054 7520 .Su Mo Tu 0000020: 5765 2054 6820 4672 2053 6120 200a 2031 We Th Fr Sa . 1 0000030: 2020 3220 2033 2020 3420 5f08 205f 0835 2 3 4 _. _.5 0000040: 2020 3620 2037 2020 0a20 3820 2039 2031 6 7 . 8 9 1 0000050: 3020 3131 2031 3220 3133 2031 3420 200a 0 11 12 13 14 . 0000060: 3135 2031 3620 3137 2031 3820 3139 2032 15 16 17 18 19 2 0000070: 3020 3231 2020 0a32 3220 3233 2032 3420 0 21 .22 23 24 0000080: 3235 2032 3620 3237 2032 3820 200a 3239 25 26 27 28 .29 0000090: 2033 3020 3331 2020 2020 2020 2020 2020 30 31 00000a0: 2020 2020 0a20 2020 2020 2020 2020 2020 . 00000b0: 2020 2020 2020 2020 2020 200a . Note this is the line with the escape characters 0000030: 2020 3220 2033 2020 3420 5f08 205f 0835 2 3 4 _. _.5 Rob