]> diplodocus.org Git - nmh/blob - man/mhparam.man
mhlsbr.c: Don't strchr(3) non-string NUL-less buffer.
[nmh] / man / mhparam.man
1 .TH MHPARAM %manext1% 2017-02-18 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 mhparam \- print nmh profile and context components
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B mhparam
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RI [ components ]
14 .RB [ \-all ]
15 .RB [ \-component " | " \-nocomponent ]
16 .RB [ \-debug ]
17 .ad
18 .SH DESCRIPTION
19 .B mhparam
20 writes the value of the specified profile component to the standard
21 output, separated by newlines. Component name matching is
22 case-insensitive. If the profile component is not present, the
23 default value (or nothing, if there is no default) is printed.
24 .PP
25 If the switch
26 .B \-component
27 is given, then the component name is displayed along with the profile
28 components value. This can be disabled with the switch
29 .BR \-nocomponent .
30 .PP
31 If more than one component is specified in the
32 .I components
33 list, then the switch
34 .B \-component
35 is on by default. If only one component is specified, then the switch
36 .B \-nocomponent
37 is on by default.
38 .PP
39 If
40 .B \-all
41 is specified, then all components in the nmh profile are displayed
42 and other arguments are ignored.
43 .PP
44 .B mhparam
45 can provide other information, such as the
46 .B nmh
47 version identifier, the locations of the nmh
48 .IR bindir ,
49 .IR libexecdir ,
50 .IR etcdir ,
51 and
52 .I docdir
53 install directories, all
54 .I proc
55 settings, and the
56 .I datalocking
57 method described in
58 .IR mh\-profile (5).
59 Information about the configuration of the
60 .B nmh
61 installation is also available, including the default mail spool
62 locking method. To test whether the configuration includes
63 support for SASL, TLS,
64 .IR iconv (3),
65 and oauth, the following commands, respectively, will output a non-null
66 string to indicate support:
67 .PP
68 .RS 5
69 .nf
70 mhparam\0sasl
71 mhparam\0tls
72 mhparam\0iconv
73 mhparam\0oauth
74 .fi
75 .RE
76 .PP
77 Conversely, no output means that the specified support is not included.
78 The
79 .B \-debug
80 switch displays all such other information available from
81 .BR mhparam .
82 .PP
83 Examples:
84 .PP
85 .RS 5
86 .nf
87 .ta \w'AliasFile:'u+2n
88 % mhparam path
89 Mail
90
91 % mhparam mhlproc
92 %nmhlibexecdir%/mhl
93
94 % mhparam \-component Path
95 Path: Mail
96
97 % mhparam AliasFile rmmproc
98 AliasFile: aliases
99 rmmproc: rmmproc
100
101 % mhparam \-nocomponent AliasFile rmmproc
102 aliases
103 rmmproc
104
105 % mhparam path nonexistent context
106 Path: Mail
107 context: context
108
109 % mhparam version
110 %nmhversion%
111
112 % mhparam etcdir
113 %nmhetcdir%
114
115 % mhparam libexecdir
116 %nmhlibexecdir%
117
118 % mhparam spoollocking
119 %default_locking%
120
121 % mhparam datalocking
122 fcntl
123
124 % mhparam sasl
125 cyrus_sasl
126
127 % mhparam tls
128 tls
129
130 % mhparam iconv
131 iconv
132
133 % mhparam oauth
134 oauth
135 .fi
136 .RE
137 .PP
138 .B mhparam
139 is also useful in backquoted operations:
140 .PP
141 .RS 5
142 .nf
143 % fgrep cornell.edu `mhpath +`/`mhparam aliasfile`
144 .fi
145 .SH "EXIT STATUS"
146 The exit status is zero if all components are found,
147 or one if any are missing.
148 .
149 .SH FILES
150 .fc ^ ~
151 .nf
152 .ta \w'ExtraBigProfileName 'u
153 ^$HOME/.mh_profile~^The user profile
154 ^or $MH~^Rather than the standard profile
155 ^<mh-dir>/context~^The user context
156 ^or $MHCONTEXT~^Rather than the standard context
157 .fi
158 .SH "PROFILE COMPONENTS"
159 .fc ^ ~
160 .nf
161 .ta 2.4i
162 .ta \w'ExtraBigProfileName 'u
163 ^context:~^To determine the context file
164 .fi
165 .SH "SEE ALSO"
166 .IR mh-profile (5)
167 .SH DEFAULTS
168 .nf
169 .RB ` \-nocomponent "' if only one component is specified"
170 .RB ` \-component "' if more than one component is specified"
171 .RB ` components "' defaults to none"
172 .fi
173 .SH CONTEXT
174 None