]> diplodocus.org Git - nmh/blob - etc/scan.highlighted
Simplified m_strn() per Ralph's suggestions.
[nmh] / etc / scan.highlighted
1 %; scan.highlighted
2 %;
3 %; This file shows how to use ANSI escape sequences to highlight a
4 %; current message in yellow and any unseen messages in cyan (both on
5 %; black background). It differs from the default scan format in the
6 %; two additional lines at the beginning and the literal sequence at
7 %; the end.
8 %;
9 %; To enable use of this format, add "-form scan.highlighted" to your
10 %; scan invocation or to your profile (~/.mh_profile), e.g.:
11 %; scan: -form scan.highlighted
12 %;
13 %; You can optionally copy this file to your MH Path and modify as
14 %; desired.
15 %;
16 %; The mh-sequence(5) man page describes the unseen sequence.
17 %;
18 %; A more readable approach would add escape sequences to your profile, e.g.:
19 %; normal: \e[m
20 %; bright-black: \e[1;30m
21 %; red: \e[31m
22 %; green: \e[32m
23 %; yellow: \e[33m
24 %; blue: \e[34m
25 %; magenta: \e[35m
26 %; cyan: \e[36m
27 %; bright-white: \e[1;37m
28 %; underlined-white: \e[4;37m
29 %; To use them in the format, e.g., at the beginning:
30 %; %<(cur)%(zputlit(profile yellow))%>\
31 %; %<(unseen)%(zputlit(profile cyan))%>\
32 %; and at the end:
33 %; %(void(profile normal))%(zputlit)
34 %;
35 %<(cur)%(zputlit(lit \e[33;40m))%>\
36 %<(unseen)%(zputlit(lit \e[36;40m))%>\
37 %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
38 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
39 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
40 %<(zero)%17(unquote(decode(friendly{from})))%> \
41 %(decode{subject})%<{body}<<%{body}>>%>%(zputlit(lit \e[m))