FOLDER(1mh)

πŸ“¦
version 1.8 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay bestie, so folder and folders are here to set or list your current nmh folder and/or message. that's it, that's the whole vibe ✨


🌸 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 like, plot twist:

folders is equivalent to folder -all

that's the entire difference, no cap πŸŽ€


✨ DESCRIPTION ✨

so when folder gets handed the -print switch (which is the default btw, the main character), it lists out: the current folder, how many messages are in it and their range (low-high), the folder's current message, and a lil heads-up if there are extra files. for example:

     inbox+            has  16 messages (  3- 22); cur=  5.

if you throw in a +folder and/or a msg, they become the current folder and/or message. lowkey it's giving shell energy: when you pass a +folder argument, that's basically a "cd" operation in the shell; when you don't pass a +folder, it's roughly a "pwd" operation in the shell. if you say -noprint, you can still pass a +folder and/or msg to set the current folder and/or message, it just won't print the folder summary. quiet mode. 🀫

now, if the folder you named (or the default one) doesn't exist, folder is gonna ask you whether it should be created. but β€” plot twist β€” when standard input is not a tty, the answer is just assumed to be "yes". the -create switch tells folder to make new folders without asking anything. (super easy way to create an empty folder for later, iykyk.) and if you say -nocreate, folder will print an error message and exit without creating a folder. periodt.

πŸ¦‹ Multiple Folders πŸ¦‹

specifying -all gives you a summary line for each top-level folder in the user's nmh directory, sorted alphabetically. (and fr, if folder gets invoked by a name ending with "s" β€” like folders β€” then -all is just assumed.) if you add -recurse along with -all, you get a line for all the sub-folders too. and these folders are all preceded by any read-only folders, which show up as "atr-cur-" entries in the user's nmh context. example time:

     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

so that little "+" after inbox? that's telling you it's the current folder. and the "(others)" means the folder ucom contains files that aren't messages β€” could be sub-folders, could be files that just don't belong under the nmh file naming scheme. either way, not messages. πŸ’€

the header gets output if either the -all or -header switches are specified. and it gets suppressed by -noheader.

the folder and message totals get output if either the -all or -total switches are specified. suppressed by -nototal.

if -fast is given, only the folder name (or names, when it's -all) gets 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 β€” on top of 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 it was supplied) or the current folder.

okay so the -recurse switch lists each folder recursively, which means its whole existence effectively defeats the speed enhancement of -fast, since every single folder has to be searched for sub-folders. still, combining these options is genuinely useful. bestie it's a tradeoff, we move. 🌈

🌸 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. very "keep me updated bestie" of it. πŸ’…

πŸ’œ The Folder Stack πŸ’œ

the -push switch tells folder to push the current folder onto the folder-stack, and make the +folder argument the current folder. if +folder isn't given, the current folder and the top of the folder-stack get swapped. this is the "pushd" operation in the shell, fr fr.

the -pop switch tells folder to discard the top of the folder-stack, after setting the current folder to that value. no +folder argument allowed here, sorry. this is the "popd" operation in the shell. and heads up: -push and -pop 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 tells folder to list the folder-stack. no +folder argument allowed. after a successful -push or -pop, the -list action happens automatically, unless a -nolist switch follows them on the command line. this is the "dirs" operation in the shell. and important: the -push, -pop, and -list switches disable the default -print behavior. noted. πŸ“


πŸŽ€ 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 πŸ‘‘

mhpath(1), refile(1), rmf(1)


πŸ’… DEFAULTS πŸ’…

  • +folder β€” the current folder.
  • msg β€” "none"
  • -nofast
  • -noheader
  • -nototal
  • -nopack
  • -norecurse
  • -noverbose
  • -print β€” is the default if none of -list, -push, or -pop are specified.
  • -list β€” is the default if -push, or -pop is specified.

πŸ”₯ CONTEXT πŸ”₯

if +folder and/or msg are given, they become the current folder and/or message.


πŸ’€ BUGS πŸ’€

okay so there is genuinely no way to restore the default behavior (aka asking the user whether to create a non-existent folder) after -create or -nocreate is given. that's it. that's the bug. good luck bestie 😭

and that's the whole page, babe 🫢 this was folder(1mh) from <strong>nmh-1.8</strong>, dated <strong>2016-08-29</strong> β€” go forth and folder your folders, you absolute icon 🌟

πŸ“¦ where this page comes from