FOLDER(1)
π FOLDER(1) β bestie edition π
ok so folder (and its lil twin folders) is literally the vibe-check command for your nmh setup: it sets and/or lists your current nmh folder and message. it's giving pwd, but make it mail. π
β¨ SYNOPSIS β¨
folder [-help] [-version] [+folder] [msg] [-all | -noall] [-create |
-nocreate] [-fast | -nofast] [-header | -noheader] [-recurse |
-norecurse] [-total | -nototal] [-list | -nolist] [-push | -pop]
[-pack | -nopack] [-print | -noprint] [-verbose | -noverbose]
and also, plot twist:
folders is equivalent to folder -all
πΈ DESCRIPTION πΈ
so when you hand folder the -print switch (which is, like, the default btw), it shows you: the current folder, how many messages are in it and their range (low-high), the folder's current message, and a lil indication of extra files if there are any. for example:
inbox+ has 16 messages ( 3- 22); cur= 5.
if you specify a +folder and/or msg, they become the current folder and/or message. (iykyk: when you give a +folder argument, that's basically the cd operation in the shell; when you don't give a +folder argument, that's roughly the pwd operation in the shell.) and if you go -noprint, you can still pass a +folder and/or msg to set the current folder and/or message β you just won't get the folder summary printed. no summary, still slaying.
if the folder you specified (or the default one) doesn't exist, folder will ask you if it should be created. but when standard input is not a tty, the answer is assumed to be "yes". the -create switch tells folder to just create new folders with no query at all. (it's literally the easiest way to make an empty folder for later, no cap.) and specifying -nocreate will make folder print an error message and exit without creating a folder. rude, but valid.
π¦ Multiple Folders π¦
specifying -all gives you a summary line for every top-level folder in your nmh directory, sorted alphabetically. (and psst β if folder gets invoked by a name ending in "s" like folders, then -all is assumed automatically.) if you specify -recurse along with -all, you also get a line for all sub-folders. all these folders are preceded by any read-only folders, which show up as atr-cur- entries in your nmh context. for example:
FOLDER # MESSAGES RANGE CUR (OTHERS)
/var/work/folder has 35 messages ( 1- 35); cur=23.
/usr/bugs/Mail has 82 messages ( 1-108); cur=82.
ff has no messages.
inbox+ has 16 messages ( 3- 22); cur= 5.
mh has 76 messages (15- 76); cur=70.
notes has 2 messages ( 1- 2); cur= 1.
ucom has 124 messages ( 1-124); cur= 6; (others).
TOTAL = 339 messages in 7 folders
the + after inbox means it's the current folder, main character energy obviously. and the (others) means the folder ucom contains files that aren't messages β those could be sub-folders, or files that just don't belong under the nmh file naming scheme.
the header gets output if either the -all or -header switches are specified. it gets suppressed by -noheader.
the folder and message totals get output if either the -all or -total switches are specified. they get suppressed by -nototal.
if -fast is given, only the folder name (or names, in the case of -all) will be listed. (it's faster because the folders don't need to be read. speed. π
)
if a +folder is given with the -all switch, folder will β in addition to setting the current folder β list the top-level sub-folders for the current folder (with -norecurse), or list all sub-folders under the current folder recursively (with -recurse).
if msg is supplied, together with +folder or without -all, it becomes the current message of +folder (if +folder had been supplied) or the current folder.
the -recurse switch lists each folder recursively, so using it effectively defeats the speed enhancement of -fast, since each folder has to be searched for sub-folders. nevertheless, the combination of these options is useful. so like, pick your fighter. β¨
π Compacting a Folder π
the -pack switch will compress the message names in the designated folders, removing holes in message numbering. and the -verbose switch tells folder to tell you the general actions it's taking to compress the folder. keeping you in the loop, as it should.
π The Folder Stack π
the -push switch directs folder to push the current folder onto the folder-stack, and make the +folder argument the current folder. if +folder is not given, the current folder and the top of the folder-stack are exchanged. this corresponds to the pushd operation in the shell. iconic behavior.
the -pop switch directs folder to discard the top of the folder-stack, after setting the current folder to that value. no +folder argument is allowed here. this corresponds to the popd operation in the shell. and heads up bestie: the -push and -pop switches are mutually exclusive β the last occurrence of either one overrides any previous occurrence of the other. also, using either of these switches sets -list by default.
the -list switch directs folder to list the folder-stack. no +folder argument is allowed. after a successful -push or -pop, the -list action is taken, unless a -nolist switch follows them on the command line. this corresponds to the dirs operation in the shell. and the -push, -pop, and -list switches disable the default -print behavior. periodt.
π FILES π
$HOME/.mh_profileβ the user's profile.
π§ PROFILE COMPONENTS π§
Path:β to determine the user's nmh directory.Current-Folder:β to find the default current folder.Folder-Protect:β to set mode when creating a new folder.Folder-Stack:β to determine the folder stack.
π SEE ALSO π
π DEFAULTS π
+folderβ the current folder.msgβ "none"-nofast-noheader-nototal-nopack-norecurse-noverbose-printβ is the default if none of-list,-push, or-popare specified.-listβ is the default if-push, or-popis specified.
π« CONTEXT π«
if +folder and/or msg are given, they will become the current folder and/or message.
π BUGS π
there is no way to restore the default behavior (which is asking the user whether to create a non-existent folder) after -create or -nocreate is given. so like, once you commit, you commit. choose wisely bestie π
that's the whole page!! this one's from nmh-1.8, dated 2016-08-29, and it's the FOLDER(1) page of the General Commands Manual. go forth and folder, my love π«Άβ¨
π¦ where this page comes from
- alpine 3.24: nmh-doc 1.8-r3 Β· BSD-3-Clause
- epel 10: nmh 1.8-3.el10_1 Β· BSD
- epel 9: nmh 1.8-1.el9 Β· BSD
- fedora 43: nmh 1.8-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: nmh 1.8-10.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: nmh 1.8
- nixpkgs unstable: nmh 1.8
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms