1 .TH MHPATH %manext1% 2012-02-18 "%nmhversion%"
6 mhpath \- print full pathnames of nmh messages and folders
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,
22 outputs the current mail folder's pathname instead.
23 If the only argument is `+', your
25 \*(lqPath\*(rq is output; this can be useful in shell scripts.
27 In contrast with other
29 commands, a message argument to
31 may often be intended for writing. Because of this:
33 the name \*(lqnew\*(rq has been added to
35 list of reserved message names (the others are \*(lqfirst\*(rq,
36 \*(lqlast\*(rq, \*(lqprev\*(rq, \*(lqnext\*(rq, \*(lqcur\*(rq,
38 The new message is equivalent to the message after the last message
39 in a folder (and equivalent to 1 in a folder without messages).
40 The \*(lqnew\*(rq message may not be used as part of a message range.
42 Within a message list, the following designations may refer to messages
43 that do not exist: a single numeric message name, the single message name
44 \*(lqcur\*(rq, and (obviously) the single message name \*(lqnew\*(rq.
45 All other message designations must refer to at least one existing
46 message, if the folder contains messages.
48 An empty folder is not, in itself, an error.
50 A message number less than that of the smallest existing message in a
51 folder is treated as if the message already exists. A message number
52 greater than that of the highest existing message in a folder causes
53 an \*(lqout of range\*(rq error message to be displayed.
55 As part of a range designation that contains messages that do exist,
56 message numbers less than the smallest, or greater than the highest,
57 existing message in a folder are ignored.
59 Examples: The current folder foo contains messages 3 5 6.
73 mhpath: message 2001 out of range 1-6
88 mhpath: bad message list last\-new
94 mhpath: no messages in range 1\-2
107 is also useful in backquoted operations:
111 $ cd \`mhpath +inbox\`
126 mv \`mhpath 501 500\`
130 to will not move 501 to 500; quite the reverse. But
134 mv \`mhpath 501\` \`mhpath 500\`
140 Out-of-range message 0 produces a different error message than large
141 out-of-range message numbers. But both cause
143 to exit with non-zero status.
147 .ta \w'ExtraBigProfileName 'u
148 ^$HOME/.mh_profile~^The user profile
150 .SH "PROFILE COMPONENTS"
154 .ta \w'ExtraBigProfileName 'u
155 ^Path:~^To determine the user's nmh directory
156 ^Current\-Folder:~^To find the default current folder
162 .RB ` +folder "' defaults to the current folder"
163 .RB ` msgs "' defaults to none"