1FOLDER(1)                   General Commands Manual                  FOLDER(1)
2
3
4

NAME

6       folder, folders - set/list current nmh folder/message
7

SYNOPSIS

9       folder [-help] [-version] [+folder] [msg] [-all | -noall] [-create |
10            -nocreate] [-fast | -nofast] [-header | -noheader] [-recurse |
11            -norecurse] [-total | -nototal] [-list | -nolist] [-push | -pop]
12            [-pack | -nopack] [-print | -noprint] [-verbose | -noverbose]
13
14       folders is equivalent to folder -all
15

DESCRIPTION

17       When folder is given the -print switch (the  default),  it  lists:  the
18       current  folder,  the  number  of  messages in it and their range (low-
19       high), the folder's current message, and an indication of extra  files,
20       if any.  For example:
21
22            inbox+            has  16 messages (  3- 22); cur=  5.
23
24       If  a  +folder  and/or  msg are specified, they will become the current
25       folder and/or message.  (When a +folder argument is given, this  corre‐
26       sponds  to  a  “cd” operation in the shell; when no +folder argument is
27       given, this corresponds roughly to a “pwd” operation in the shell.)  If
28       -noprint  is  specified, a +folder and/or msg may still be specified to
29       set the current folder and/or message, but the folder summary will  not
30       be printed.
31
32       If the specified (or default) folder doesn't exist, folder will ask the
33       user if the folder should be created; when standard input is not a tty,
34       the  answer is assumed to be “yes”.  The -create switch tells folder to
35       create new folders without query.  (This is an easy way  to  create  an
36       empty folder for later use.)  Specifying -nocreate will cause folder to
37       print an error message and exit without creating a folder.
38
39   Multiple Folders
40       Specifying -all will produce a summary line for each  top-level  folder
41       in  the user's nmh directory, sorted alphabetically.  (If folder is in‐
42       voked by a name ending with “s”  (e.g.   folders),  -all  is  assumed.)
43       Specifying  -recurse with -all will include a line for all sub-folders.
44       These folders are all preceded by any read-only folders, which occur as
45atr-cur-” entries in the user's nmh context.  For example:
46
47            FOLDER                  # MESSAGES RANGE      CUR     (OTHERS)
48            /var/work/folder  has  35 messages ( 1- 35);  cur=23.
49            /usr/bugs/Mail    has  82 messages ( 1-108);  cur=82.
50            ff                has  no messages.
51            inbox+            has  16 messages ( 3- 22);  cur= 5.
52            mh                has  76 messages (15- 76);  cur=70.
53            notes             has   2 messages ( 1-  2);  cur= 1.
54            ucom              has 124 messages ( 1-124);  cur= 6; (others).
55            TOTAL = 339 messages in 7 folders
56
57       The  “+”  after  inbox  indicates  that  it is the current folder.  The
58       “(others)” indicates that the folder ucom contains files  which  aren't
59       messages;  these  may either be sub-folders, or files that don't belong
60       under the nmh file naming scheme.
61
62       The header is output if either the -all or -header switches are  speci‐
63       fied.  It is suppressed by -noheader.
64
65       The  folder  and message totals are output if either the -all or -total
66       switches are specified.  They are suppressed by -nototal.
67
68       If -fast is given, only the folder name (or names, in the case of -all)
69       will be listed.  (This is faster because the folders need not be read.)
70
71       If a +folder is given with the -all switch, folder will, in addition to
72       setting the current folder, list the top-level sub-folders for the cur‐
73       rent folder (with -norecurse) or list all sub-folders under the current
74       folder recursively (with -recurse).
75
76       If msg is supplied, together with +folder or without -all, it will  be‐
77       come  the  current  message of +folder (if it had been supplied) or the
78       current folder.
79
80       The -recurse switch lists each folder recursively, so  its  use  effec‐
81       tively  defeats  the speed enhancement of -fast, since each folder must
82       be searched for sub-folders.  Nevertheless, the  combination  of  these
83       options is useful.
84
85   Compacting a Folder
86       The  -pack  switch  will  compress  the message names in the designated
87       folders, removing holes in message numbering.  The -verbose switch  di‐
88       rects  folder to tell the user the general actions it is taking to com‐
89       press the folder.
90
91   The Folder Stack
92       The -push switch directs folder to push the  current  folder  onto  the
93       folder-stack,  and  make  the  +folder argument the current folder.  If
94       +folder is not given, the current folder and the  top  of  the  folder-
95       stack  are exchanged.  This corresponds to the “pushd” operation in the
96       shell.
97
98       The -pop switch directs folder to discard the top of the  folder-stack,
99       after setting the current folder to that value.  No +folder argument is
100       allowed.  This corresponds to the “popd” operation in the  shell.   The
101       -push  and -pop switches are mutually exclusive: the last occurrence of
102       either one overrides any previous occurrence of the other.  The use  of
103       either of these switches also sets -list, by default.
104
105       The  -list  switch directs folder to list the folder-stack.  No +folder
106       argument is allowed.  After a successful -push or -pop, the  -list  ac‐
107       tion  is  taken,  unless  a  -nolist switch follows them on the command
108       line.  This corresponds to the “dirs”  operation  in  the  shell.   The
109       -push, -pop, and -list switches disable the default -print behavior.
110

FILES

112       $HOME/.mh_profile   The user's profile.
113

PROFILE COMPONENTS

115       Path:               To determine the user's nmh directory.
116       Current-Folder:     To find the default current folder.
117       Folder-Protect:     To set mode when creating a new folder.
118       Folder-Stack:       To determine the folder stack.
119

SEE ALSO

121       mhpath(1), refile(1), rmf(1)
122

DEFAULTS

124       +folder             The current folder.
125       msg                 “none”
126       -nofast
127       -noheader
128       -nototal
129       -nopack
130       -norecurse
131       -noverbose
132       -print              is the default if none of -list, -push, or -pop are
133                           specified.
134       -list               is the default if -push, or -pop is specified.
135

CONTEXT

137       If +folder and/or msg are given, they will become  the  current  folder
138       and/or message.
139

BUGS

141       There  is  no  way  to  restore  the  default behavior (to ask the user
142       whether to create a non-existent folder) after -create or -nocreate  is
143       given.
144
145
146
147nmh-1.8                           2016-08-29                         FOLDER(1)
Impressum