Removed note from BUGS section of several man pages saying
[mmh] / man / mhpath.man
1 .TH MHPATH %manext1% "November 6, 2012" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
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 backquoted 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 Because
119 .B mhpath
120 expands and sorts
121 .RI [ msgs ].
122 the command
123 .PP
124 .RS 5
125 .nf
126 mv `mhpath 501 500`
127 .fi
128 .RE
129 .PP
130 to will not move 501 to 500.
131 Quite the reverse.  But
132 .PP
133 .RS 5
134 .nf
135 mv `mhpath 501` `mhpath 500`
136 .fi
137 .RE
138 .PP
139 will do the trick.
140 .PP
141 Out of range message 0 is treated far more severely than large out of
142 range message numbers.
143 .SH FILES
144 .fc ^ ~
145 .nf
146 .ta \w'%etcdir%/ExtraBigFileName  'u
147 ^$HOME/\&.mh\(ruprofile~^The user profile
148 .fi
149 .SH "PROFILE COMPONENTS"
150 .fc ^ ~
151 .nf
152 .ta 2.4i
153 .ta \w'ExtraBigProfileName  'u
154 ^Path:~^To determine the user's nmh directory
155 ^Current\-Folder:~^To find the default current folder
156 .fi
157 .SH "SEE ALSO"
158 .IR folder (1)
159 .SH DEFAULTS
160 .nf
161 .RB ` +folder "' defaults to the current folder"
162 .RB ` msgs "' defaults to none"
163 .fi
164 .SH CONTEXT
165 None