]> diplodocus.org Git - nmh/blob - man/mhparam.man
Simplified m_strn() per Ralph's suggestions.
[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 the
58 .IR mh\-profile (5)
59 man page. 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 Note that the internal
84 .B libdir
85 component has been replaced by
86 .BR libexecdir .
87 The old form is deprecated and will be removed in a future release.
88 .PP
89 Examples:
90 .PP
91 .RS 5
92 .nf
93 .ta \w'AliasFile:'u+2n
94 % mhparam path
95 Mail
96
97 % mhparam mhlproc
98 %nmhlibexecdir%/mhl
99
100 % mhparam \-component Path
101 Path: Mail
102
103 % mhparam AliasFile rmmproc
104 AliasFile: aliases
105 rmmproc: rmmproc
106
107 % mhparam \-nocomponent AliasFile rmmproc
108 aliases
109 rmmproc
110
111 % mhparam path nonexistent context
112 Path: Mail
113 context: context
114
115 % mhparam version
116 %nmhversion%
117
118 % mhparam etcdir
119 %nmhetcdir%
120
121 % mhparam libexecdir
122 %nmhlibexecdir%
123
124 % mhparam spoollocking
125 %default_locking%
126
127 % mhparam datalocking
128 fcntl
129
130 % mhparam sasl
131 cyrus_sasl
132
133 % mhparam tls
134 tls
135
136 % mhparam iconv
137 iconv
138
139 % mhparam oauth
140 oauth
141 .fi
142 .RE
143 .PP
144 .B mhparam
145 is also useful in backquoted operations:
146 .PP
147 .RS 5
148 .nf
149 % fgrep cornell.edu `mhpath +`/`mhparam aliasfile`
150 .fi
151 .SH "EXIT STATUS"
152 .B mhparam
153 returns the number of components that were not found,
154 but limits the return value to 120 to avoid ambiguity,
155 e.g.\& 127 is used by shells to indicate `command not found',
156 and 256 would wrap to 0, falsely indicating success.
157 .
158 .SH FILES
159 .fc ^ ~
160 .nf
161 .ta \w'ExtraBigProfileName 'u
162 ^$HOME/.mh_profile~^The user profile
163 ^or $MH~^Rather than the standard profile
164 ^<mh-dir>/context~^The user context
165 ^or $MHCONTEXT~^Rather than the standard context
166 .fi
167 .SH "PROFILE COMPONENTS"
168 .fc ^ ~
169 .nf
170 .ta 2.4i
171 .ta \w'ExtraBigProfileName 'u
172 ^context:~^To determine the context file
173 .fi
174 .SH "SEE ALSO"
175 .IR mh-profile (5)
176 .SH DEFAULTS
177 .nf
178 .RB ` \-nocomponent "' if only one component is specified"
179 .RB ` \-component "' if more than one component is specified"
180 .RB ` components "' defaults to none"
181 .fi
182 .SH CONTEXT
183 None