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