* uip/mhlistsbr.c, uip/mhlsbr.c, uip/picksbr.c: cast
[mmh] / man / mhpath.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH MHPATH %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 mhpath \- print full pathnames of nmh messages and folders
8 .SH SYNOPSIS
9 .HP 5
10 .na
11 .B mhpath
12 .RI [ +folder ]
13 .RI [ msgs ]
14 .RB [ \-version ]
15 .RB [ \-help ]
16 .ad
17 .SH DESCRIPTION
18 .B Mhpath
19 expands and sorts the message list `msgs' and writes the full
20 pathnames of the messages to the standard output separated by newlines.
21 If no `msgs' are specified,
22 .B mhpath
23 outputs the folder pathname
24 instead.  If the only argument is `+', your
25 .B nmh
26 \*(lqPath\*(rq is output; this can be useful is shell scripts.
27 .PP
28 Contrasted with other
29 .B nmh
30 commands, a message argument to
31 .B mhpath
32 may often be intended for writing.  Because of this:
33 .PP
34 .IP 1) 4
35 the name \*(lqnew\*(rq has been added to
36 .BR mhpath 's
37 list of
38 reserved message names (the others are \*(lqfirst\*(rq, \*(lqlast\*(rq,
39 \*(lqprev\*(rq, \*(lqnext\*(rq, \*(lqcur\*(rq, and \*(lqall\*(rq).
40 The new message is equivalent to the message after the last message
41 in a folder (and equivalent to 1 in a folder without messages).
42 The \*(lqnew\*(rq message may not be used as part of a message range.
43 .IP 2) 4
44 Within a message list, the following designations may refer to messages
45 that do not exist: a single numeric message name, the single message name
46 \*(lqcur\*(rq, and (obviously) the single message name \*(lqnew\*(rq.
47 All other message designations must refer to at least one existing
48 message.
49 .IP 3) 4
50 An empty folder is not in itself an error.
51 .PP
52 Message numbers greater than the highest existing message in a folder
53 as part of a range designation are replaced with the next free message
54 number.
55 .PP
56 Examples: The current folder foo contains messages 3 5 6.
57 Cur is 4.
58 .PP
59 .RS 5
60 .nf
61 % mhpath
62 /r/phyl/Mail/foo
63
64 % mhpath all
65 /r/phyl/Mail/foo/3
66 /r/phyl/Mail/foo/5
67 /r/phyl/Mail/foo/6
68
69 % mhpath 2001
70 /r/phyl/Mail/foo/7
71
72 % mhpath 1\-2001
73 /r/phyl/Mail/foo/3
74 /r/phyl/Mail/foo/5
75 /r/phyl/Mail/foo/6
76
77 % mhpath new
78 /r/phyl/Mail/foo/7
79
80 % mhpath last new
81 /r/phyl/Mail/foo/6
82 /r/phyl/Mail/foo/7
83
84 % mhpath last\-new
85 bad message list \*(lqlast\-new\*(rq.
86
87 % mhpath cur
88 /r/phyl/Mail/foo/4
89
90 % mhpath 1\-2
91 no messages in range \*(lq1\-2\*(rq.
92
93 % mhpath first:2
94 /r/phyl/Mail/foo/3
95 /r/phyl/Mail/foo/5
96
97 % mhpath 1 2
98 /r/phyl/Mail/foo/1
99 /r/phyl/Mail/foo/2
100 .fi
101 .RE
102 .PP
103 .B mhpath
104 is also useful in back\-quoted operations:
105 .PP
106 .RS 5
107 .nf
108 % cd `mhpath +inbox`
109
110 % echo `mhpath +`
111 /r/phyl/Mail
112 .fi
113 .RE
114 .PP
115
116 .SH FILES
117 .fc ^ ~
118 .nf
119 .ta \w'%etcdir%/ExtraBigFileName  'u
120 ^$HOME/\&.mh\(ruprofile~^The user profile
121 .fi
122
123 .SH "PROFILE COMPONENTS"
124 .fc ^ ~
125 .nf
126 .ta 2.4i
127 .ta \w'ExtraBigProfileName  'u
128 ^Path:~^To determine the user's nmh directory
129 ^Current\-Folder:~^To find the default current folder
130 .fi
131
132 .SH "SEE ALSO"
133 folder(1)
134
135 .SH DEFAULTS
136 .nf
137 .RB ` +folder "' defaults to the current folder"
138 .RB ` msgs "' defaults to none"
139 .fi
140
141 .SH CONTEXT
142 None
143
144 .SH BUGS
145 Like all
146 .B nmh
147 commands,
148 .B mhpath
149 expands and sorts
150 .RI [ msgs ].
151 So don't
152 expect
153 .PP
154 .RS 5
155 .nf
156 mv `mhpath 501 500`
157 .fi
158 .RE
159 .PP
160 to move 501 to 500.
161 Quite the reverse.  But
162 .PP
163 .RS 5
164 .nf
165 mv `mhpath 501` `mhpath 500`
166 .fi
167 .RE
168 .PP
169 will do the trick.
170 .PP
171 Out of range message 0 is treated far more severely than large out of
172 range message numbers.