With -messageid random, make the part after the @ more resemble a
[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 current mail folder's pathname
23 instead.  If the only argument is `+', your
24 .B nmh
25 \*(lqPath\*(rq is output; this can be useful in 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, if the folder contains messages.
48 .IP 3) 4
49 An empty folder is not in itself an error.
50 .PP
51 A message number less than that of the smallest existing message in a
52 folder is treated as if the message already exists.  A message number
53 greater than that of the highest existing message in a folder causes
54 an \*(lqout of range\*(rq error message to be displayed.
55 .PP
56 As part of a range designation that contains messages that do exist,
57 message numbers less than the smallest, or greater than the highest,
58 existing message in a folder are ignored.
59 .PP
60 Examples: The current folder foo contains messages 3 5 6.
61 Cur is 4.
62 .PP
63 .RS 5
64 .nf
65 % mhpath
66 /r/phyl/Mail/foo
67
68 % mhpath all
69 /r/phyl/Mail/foo/3
70 /r/phyl/Mail/foo/5
71 /r/phyl/Mail/foo/6
72
73 % mhpath 2001
74 mhpath: message 2001 out of range 1-6
75
76 % mhpath 1\-2001
77 /r/phyl/Mail/foo/3
78 /r/phyl/Mail/foo/5
79 /r/phyl/Mail/foo/6
80
81 % mhpath new
82 /r/phyl/Mail/foo/7
83
84 % mhpath last new
85 /r/phyl/Mail/foo/6
86 /r/phyl/Mail/foo/7
87
88 % mhpath last\-new
89 mhpath: bad message list last\-new
90
91 % mhpath cur
92 /r/phyl/Mail/foo/4
93
94 % mhpath 1\-2
95 mhpath: no messages in range 1\-2
96
97 % mhpath first:2
98 /r/phyl/Mail/foo/3
99 /r/phyl/Mail/foo/5
100
101 % mhpath 1 2
102 /r/phyl/Mail/foo/1
103 /r/phyl/Mail/foo/2
104 .fi
105 .RE
106 .PP
107 .B mhpath
108 is also useful in back\-quoted operations:
109 .PP
110 .RS 5
111 .nf
112 % cd `mhpath +inbox`
113
114 % echo `mhpath +`
115 /r/phyl/Mail
116 .fi
117 .RE
118 .PP
119
120 .SH FILES
121 .fc ^ ~
122 .nf
123 .ta \w'%etcdir%/ExtraBigFileName  'u
124 ^$HOME/\&.mh\(ruprofile~^The user profile
125 .fi
126
127 .SH "PROFILE COMPONENTS"
128 .fc ^ ~
129 .nf
130 .ta 2.4i
131 .ta \w'ExtraBigProfileName  'u
132 ^Path:~^To determine the user's nmh directory
133 ^Current\-Folder:~^To find the default current folder
134 .fi
135
136 .SH "SEE ALSO"
137 folder(1)
138
139 .SH DEFAULTS
140 .nf
141 .RB ` +folder "' defaults to the current folder"
142 .RB ` msgs "' defaults to none"
143 .fi
144
145 .SH CONTEXT
146 None
147
148 .SH BUGS
149 Like all
150 .B nmh
151 commands,
152 .B mhpath
153 expands and sorts
154 .RI [ msgs ].
155 So don't
156 expect
157 .PP
158 .RS 5
159 .nf
160 mv `mhpath 501 500`
161 .fi
162 .RE
163 .PP
164 to move 501 to 500.
165 Quite the reverse.  But
166 .PP
167 .RS 5
168 .nf
169 mv `mhpath 501` `mhpath 500`
170 .fi
171 .RE
172 .PP
173 will do the trick.
174 .PP
175 Out of range message 0 is treated far more severely than large out of
176 range message numbers.