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

FILES

109       $HOME/.mh_profile   The user's profile.
110

PROFILE COMPONENTS

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

SEE ALSO

118       mhpath(1), refile(1), rmf(1)
119

DEFAULTS

121       +folder             The current folder.
122       msg                 “none”
123       -nofast
124       -noheader
125       -nototal
126       -nopack
127       -norecurse
128       -noverbose
129       -print              is the default if no -list, -push, or -pop is spec‐
130                           ified.
131       -list               is the default if -push, or -pop is specified.
132

CONTEXT

134       If  +folder  and/or  msg are given, they will become the current folder
135       and/or message.
136

BUGS

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