1MHPATH(1)                    [nmh-1.2-20070115cvs]                   MHPATH(1)
2
3
4

NAME

6       mhpath - print full pathnames of nmh messages and folders
7

SYNOPSIS

9       mhpath [+folder] [msgs] [-version] [-help]
10

DESCRIPTION

12       Mhpath  expands  and  sorts the message list `msgs' and writes the full
13       pathnames of the messages to the standard output separated by newlines.
14       If no `msgs' are specified, mhpath outputs the folder pathname instead.
15       If the only argument is `+', your nmh “Path” is  output;  this  can  be
16       useful is shell scripts.
17
18       Contrasted  with  other  nmh commands, a message argument to mhpath may
19       often be intended for writing.  Because of this:
20
21       1)  the name “new” has been added to mhpath's list of reserved  message
22           names  (the  others are “first”, “last”, “prev”, “next”, “cur”, and
23           “all”).  The new message is equivalent to  the  message  after  the
24           last  message  in a folder (and equivalent to 1 in a folder without
25           messages).  The “new” message may not be used as part of a  message
26           range.
27
28       2)  Within a message list, the following designations may refer to mes‐
29           sages that do not exist: a single numeric message name, the  single
30           message  name “cur”, and (obviously) the single message name “new”.
31           All other message designations must refer to at least one  existing
32           message.
33
34       3)  An empty folder is not in itself an error.
35
36       Message  numbers  greater than the highest existing message in a folder
37       as part of a range designation are replaced with the next free  message
38       number.
39
40       Examples: The current folder foo contains messages 3 5 6.  Cur is 4.
41
42            % mhpath
43            /r/phyl/Mail/foo
44
45            % mhpath all
46            /r/phyl/Mail/foo/3
47            /r/phyl/Mail/foo/5
48            /r/phyl/Mail/foo/6
49
50            % mhpath 2001
51            /r/phyl/Mail/foo/7
52
53            % mhpath 1-2001
54            /r/phyl/Mail/foo/3
55            /r/phyl/Mail/foo/5
56            /r/phyl/Mail/foo/6
57
58            % mhpath new
59            /r/phyl/Mail/foo/7
60
61            % mhpath last new
62            /r/phyl/Mail/foo/6
63            /r/phyl/Mail/foo/7
64
65            % mhpath last-new
66            bad message list “last-new”.
67
68            % mhpath cur
69            /r/phyl/Mail/foo/4
70
71            % mhpath 1-2
72            no messages in range “1-2”.
73
74            % mhpath first:2
75            /r/phyl/Mail/foo/3
76            /r/phyl/Mail/foo/5
77
78            % mhpath 1 2
79            /r/phyl/Mail/foo/1
80            /r/phyl/Mail/foo/2
81
82       mhpath is also useful in back-quoted operations:
83
84            % cd `mhpath +inbox`
85
86            % echo `mhpath +`
87            /r/phyl/Mail
88

FILES

90       $HOME/.mh_profile          The user profile
91
92

PROFILE COMPONENTS

94       Path:                To determine the user's nmh directory
95       Current-Folder:      To find the default current folder
96
97

SEE ALSO

99       folder(1)
100
101

DEFAULTS

103       `+folder' defaults to the current folder
104       `msgs' defaults to none
105
106

CONTEXT

108       None
109
110

BUGS

112       Like  all  nmh  commands,  mhpath  expands  and sorts [msgs].  So don't
113       expect
114
115            mv `mhpath 501 500`
116
117       to move 501 to 500.  Quite the reverse.  But
118
119            mv `mhpath 501` `mhpath 500`
120
121       will do the trick.
122
123       Out of range message 0 is treated far more severely than large  out  of
124       range message numbers.
125
126
127
128MH.6.8                            1 Jul 2003                         MHPATH(1)
Impressum