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