4c2ad889a942054fe7134492902042459440c339
[mmh] / man / mhparam.man
1 .TH MHPARAM %manext1% "June 14, 2012" "%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 .BR mhparam
48 can provide other information, such as
49 the locations of the nmh
50 .I etcdir
51 and
52 .I libdir
53 install directories and all
54 .I proc
55 settings.  The
56 .B \-debug
57 switch displays all such other information available from
58 .BR mhparam .
59 .PP
60 Examples:
61 .PP
62 .RS 5
63 .nf
64 .ta \w'AliasFile:'u+2n
65 % mhparam path
66 Mail
67
68 % mhparam mhlproc
69 %libdir%/mhl
70
71 % mhparam \-component Path
72 Path: Mail
73
74 % mhparam AliasFile rmmproc
75 AliasFile: aliases
76 rmmproc: rmmproc
77
78 % mhparam \-nocomponent AliasFile rmmproc
79 aliases
80 rmmproc
81
82 % mhparam path nonexistent context
83 Path: Mail
84 context: context
85
86 % mhparam etcdir
87 %etcdir%
88
89 % mhparam libdir
90 %libdir%
91 .fi
92 .RE
93 .PP
94 .B mhparam
95 is also useful in back\-quoted operations:
96 .PP
97 .RS 5
98 .nf
99 % fgrep cornell.edu `mhpath +`/`mhparam aliasfile`
100 .fi
101 .SH "EXIT STATUS"
102 .B mhparam
103 returns the number of components that were not found.
104 .SH FILES
105 .fc ^ ~
106 .nf
107 .ta \w'%etcdir%/ExtraBigFileName  'u
108 ^$HOME/.mh_profile~^The user profile
109 ^or $MH~^Rather than the standard profile
110 ^<mh-dir>/context~^The user context
111 ^or $MHCONTEXT~^Rather than the standard context
112 .fi
113 .SH "PROFILE COMPONENTS"
114 .fc ^ ~
115 .nf
116 .ta 2.4i
117 .ta \w'ExtraBigProfileName  'u
118 ^context:~^To determine the context file
119 .fi
120 .SH "SEE ALSO"
121 .IR mh-profile (5)
122 .SH DEFAULTS
123 .nf
124 .RB ` \-nocomponent "' if only one component is specified"
125 .RB ` \-component "' if more than one component is specified"
126 .RB ` components "' defaults to none"
127 .fi
128 .SH CONTEXT
129 None