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