]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/man/mhpath.1
Replaced use of snprintf() with memcpy()/memmove().
[nmh] / docs / historical / mh-jun-1982 / man / mhpath.1
1 .TH MHPATH 1 RAND
2 .SH NAME
3 mhpath \- print full pathnames of MH messages and folders
4 .SH SYNOPSIS
5 mhpath \%[+folder] \%[msgs] \%[\-help]
6 .SH DESCRIPTION
7 \fIMhpath\fR expands and sorts the message list \%[msgs] and writes
8 the full pathnames of the messages to the standard output
9 separated by newlines.
10
11 If no ``msgs'' are specified, \fImhpath\fR outputs the folder (directory)
12 pathname (current folder default).
13
14 Contrasted with other MH commands, a message argument to \fImhpath\fR
15 may often be intended for \fIwriting\fR.
16 Because of this: 1) the name
17 "new" has been added to \fImhpath\fR's list of reserved message names
18 (the others are first, last, prev, next, cur, all).
19 New is last + 1 (where last is 0 in a messageless folder).
20 New may not be used as part of a message range.
21 2) Within a message list,
22 the following designations may refer to messages that do not exist:
23 a single numeric message name,
24 the single message name cur, and (obviously) the single message name new.
25 All other message designations must refer to at least one existing message.
26 3) An empty folder is not in itself an error.
27
28 Message numbers greater than 999 as part of a range designation
29 are replaced with 999. Explicit single message numbers greater
30 than 999, or message number 0 in any context, are errors.
31
32 Examples: The current folder foo contains messages 3 5 6.
33 Cur is 4.
34 .nf
35 \ % mhpath
36 \ /r/phyl/Mail/foo
37
38 \ % mhpath all
39 \ /r/phyl/Mail/foo/3
40 \ /r/phyl/Mail/foo/5
41 \ /r/phyl/Mail/foo/6
42
43 \ % mhpath 1000
44 \ Message 1000 out of range 1-999
45
46 \ % mhpath 1-1001
47 \ /r/phyl/Mail/foo/3
48 \ /r/phyl/Mail/foo/5
49 \ /r/phyl/Mail/foo/6
50
51 \ % mhpath new
52 \ /r/phyl/Mail/foo/7
53
54 \ % mhpath last new
55 \ /r/phyl/Mail/foo/6
56 \ /r/phyl/Mail/foo/7
57
58 \ % mhpath last-new
59 \ Bad message list "last-new".
60
61 \ % mhpath cur
62 \ /r/phyl/Mail/foo/4
63
64 \ % mhpath 1-2
65 \ No messages in range "1-2".
66
67 \ % mhpath first:2
68 \ /r/phyl/Mail/foo/3
69 \ /r/phyl/Mail/foo/5
70
71 \ % mhpath 1 2
72 \ /r/phyl/Mail/foo/1
73 \ /r/phyl/Mail/foo/2
74
75 \ % mhpath 0
76 \ Bad message list "0".
77
78 \ % mhpath 0-last
79 \ Bad message list "0-last".
80
81 \ --Backquoted Operations--
82
83 \ % cd `mhpath +inbox`
84
85 From "e":
86 \ <CMD> run cat `mhpath cur`
87
88 .fi
89 .SH FILES
90 .ta 2.4i
91 $HOME/\*.mh\(ruprofile The user profile
92 .SH PROFILE COMPONENTS
93 Path: To determine the user's MH directory
94 .br
95 Current-Folder: To find the default current folder
96 .SH DEFAULTS
97 `+folder' defaults to current
98 .br
99 `msgs' defaults to NULL
100 .SH CONTEXT
101 The folder and the current message are unaffected.
102 .SH BUGS
103 Like all MH commands, \fImhpath\fR expands and sorts \%[msgs].
104 So don't expect
105 .br
106 \ mv `mhpath 501 500`
107 .br
108 to move 501 to 500.
109 Quite the reverse. But
110 .br
111 \ mv `mhpath 501` `mhpath 500`
112 .br
113 will do the trick.
114
115 Out of range message 0 is treated far more severely than large out of
116 range message numbers.