0
|
1 .\" @(MHWARNING)
|
|
2 .\" @(#)$Id$
|
|
3 .SC MHPATH 1
|
|
4 .NA
|
|
5 mhpath \- print full pathnames of MH messages and folders
|
|
6 .SY
|
|
7 mhpath
|
|
8 \%[+folder] \%[msgs]
|
|
9 \%[\-help]
|
|
10 .DE
|
|
11 \fIMhpath\fR expands and sorts the message list `msgs' and writes
|
|
12 the full pathnames of the messages to the standard output
|
|
13 separated by newlines.
|
|
14 If no `msgs' are specified,
|
|
15 \fImhpath\fR outputs the folder pathname instead.
|
|
16 If the only argument is `+', your MH \fIPath\fR is output;
|
|
17 this can be useful is shell scripts.
|
|
18
|
|
19 Contrasted with other MH commands, a message argument to \fImhpath\fR
|
|
20 may often be intended for \fIwriting\fR.
|
|
21 Because of this:
|
|
22 .sp
|
|
23 1) the name \*(lqnew\*(rq has been added to \fImhpath\fR's list of
|
|
24 reserved message names
|
|
25 (the others are \*(lqfirst\*(rq, \*(lqlast\*(rq, \*(lqprev\*(rq,
|
|
26 \*(lqnext\*(rq, \*(lqcur\*(rq, and \*(lqall\*(rq).
|
|
27 The new message is equivalent to the message after the
|
|
28 last message in a folder
|
|
29 (and equivalent to 1 in a folder without messages).
|
|
30 The \*(lqnew\*(rq message may not be used as part of a message range.
|
|
31 .sp
|
|
32 2) Within a message list,
|
|
33 the following designations may refer to messages that do not exist:
|
|
34 a single numeric message name,
|
|
35 the single message name \*(lqcur\*(rq,
|
|
36 and (obviously) the single message name \*(lqnew\*(rq.
|
|
37 All other message designations must refer to at least one existing message.
|
|
38 .sp
|
|
39 3) An empty folder is not in itself an error.
|
|
40
|
|
41 Message numbers greater than the highest existing message in a folder as
|
|
42 part of a range designation are replaced with the next free message number.
|
|
43
|
|
44 Examples: The current folder foo contains messages 3 5 6.
|
|
45 Cur is 4.
|
|
46
|
|
47 .nf
|
|
48 .in +.5i
|
|
49 % mhpath
|
|
50 /r/phyl/Mail/foo
|
|
51
|
|
52 % mhpath all
|
|
53 /r/phyl/Mail/foo/3
|
|
54 /r/phyl/Mail/foo/5
|
|
55 /r/phyl/Mail/foo/6
|
|
56
|
|
57 % mhpath 2001
|
|
58 /r/phyl/Mail/foo/7
|
|
59
|
|
60 % mhpath 1\-2001
|
|
61 /r/phyl/Mail/foo/3
|
|
62 /r/phyl/Mail/foo/5
|
|
63 /r/phyl/Mail/foo/6
|
|
64
|
|
65 % mhpath new
|
|
66 /r/phyl/Mail/foo/7
|
|
67
|
|
68 % mhpath last new
|
|
69 /r/phyl/Mail/foo/6
|
|
70 /r/phyl/Mail/foo/7
|
|
71
|
|
72 % mhpath last\-new
|
|
73 bad message list \*(lqlast\-new\*(rq.
|
|
74
|
|
75 % mhpath cur
|
|
76 /r/phyl/Mail/foo/4
|
|
77
|
|
78 % mhpath 1\-2
|
|
79 no messages in range \*(lq1\-2\*(rq.
|
|
80
|
|
81 % mhpath first:2
|
|
82 /r/phyl/Mail/foo/3
|
|
83 /r/phyl/Mail/foo/5
|
|
84
|
|
85 % mhpath 1 2
|
|
86 /r/phyl/Mail/foo/1
|
|
87 /r/phyl/Mail/foo/2
|
|
88 .in -.5i
|
|
89 .fi
|
|
90
|
|
91 \fIMHpath\fR is also useful in back\-quoted operations:
|
|
92
|
|
93 .nf
|
|
94 .in +.5i
|
|
95 % cd `mhpath +inbox`
|
|
96
|
|
97 % echo `mhpath +`
|
|
98 /r/phyl/Mail
|
|
99 .in -.5i
|
|
100 .fi
|
|
101 .Fi
|
|
102 ^$HOME/\&.mh\(ruprofile~^The user profile
|
|
103 .Pr
|
|
104 ^Path:~^To determine the user's MH directory
|
|
105 .Ps
|
|
106 ^Current\-Folder:~^To find the default current folder
|
|
107 .Sa
|
|
108 folder(1)
|
|
109 .De
|
|
110 `+folder' defaults to the current folder
|
|
111 .Ds
|
|
112 `msgs' defaults to none
|
|
113 .Co
|
|
114 None
|
|
115 .Bu
|
|
116 Like all MH commands, \fImhpath\fR expands and sorts \%[msgs].
|
|
117 So don't expect
|
|
118
|
|
119 .ti +.5i
|
|
120 mv `mhpath 501 500`
|
|
121
|
|
122 to move 501 to 500.
|
|
123 Quite the reverse. But
|
|
124
|
|
125 .ti +.5i
|
|
126 mv `mhpath 501` `mhpath 500`
|
|
127
|
|
128 will do the trick.
|
|
129
|
|
130 Out of range message 0 is treated far more severely than large out of
|
|
131 range message numbers.
|
|
132 .En
|