]> diplodocus.org Git - nmh/blob - docs/contrib/replaliases
Added -h and -p options to replaliases. The -p argument can be useful
[nmh] / docs / contrib / replaliases
1 #### replaliases
2 ####
3 #### convenience functions for various repl(1) commands
4 #### They're functions instead of aliases for portability.
5
6 #### If using par (see mhn.defaults), it helps to have its PARINIT
7 #### environment variable set. If you really want it to be null,
8 #### either comment this out or set it to, e.g., ' '.
9 #### Removed "R" from PARINIT recommendation in par(1) man page so
10 #### that it doesn't consider words that are too long to be an error.
11 if [ -z "$PARINIT" ]; then
12 PARINIT='rTbgq B=.,?_A_a Q=_s>|'
13 export PARINIT
14 fi
15
16 #### Reply, including text/html (converted to text/plain) and
17 #### text/plain parts.
18 ####
19 #### Optional arguments:
20 #### -h to disable conversion of text/html parts
21 #### -p to disable conversion of text/plain parts
22 #### All other arguments are passed to repl.
23 #### The -p argument can be useful with improperly structured
24 #### messages, such as those that use multipart/related when they
25 #### should have used multipart/alternative.
26 rt() {
27 if [ "$1" = -h ]; then
28 shift
29 repl -filter mhl.replywithoutbody -convertargs text/plain '' "$@"
30 elif [ "$1" = -p ]; then
31 shift
32 repl -filter mhl.replywithoutbody -convertargs text/html '' "$@"
33 else
34 repl -filter mhl.replywithoutbody \
35 -convertargs text/html '' -convertargs text/plain '' "$@"
36 fi
37 }
38
39
40 # Local Variables:
41 # mode: sh
42 # End: