.RB [ \-list " | " \-nolist ]
.RB [ \-push " | " \-pop ]
.RB [ \-pack " | " \-nopack ]
-.RB [ \-print ]
+.RB [ \-print " | " \-noprint ]
.RB [ \-verbose " | " \-noverbose ]
.HP 5
.B folders
in the shell; when no
.I +folder
argument is given, this corresponds roughly to a \*(lqpwd\*(rq
-operation in the shell.)
+operation in the shell.) If
+.B \-noprint
+is specified, a
+.I +folder
+and/or
+.I msg
+may still be specified to set the current folder and/or message,
+but the folder summary will not be printed.
.PP
If the specified (or default) folder doesn't exist,
.B folder
will cause
.B folder
to print an error message and exit without creating a folder.
-.\"
-.\" note - this doesn't work at present
-.\" If `\-noprint' is specified,
-.\" a `+folder' and/or `msg' may still be specified
-.\" to set the current folder and/or message,
-.\" but the folder summary will not be printed.
.SS "Multiple Folders"
Specifying
.B \-all
.BR \-pop ,
and
.B \-list
-switches all disable
-.BR \-print .
+switches disable the default
+.B \-print
+behavior.
.SH FILES
.TP 20
$HOME/.mh_profile
\-noverbose
.TP
\-print
-is the default if no
+is the default if none of
.BR -list ,
.BR \-push ,
or
.B \-pop
-is specified.
+are specified.
.TP
\-list
is the default if
int
main (int argc, char **argv)
{
- bool printsw = false;
+ int printsw = -1;
bool listsw = false;
bool pushsw = false;
bool popsw = false;
continue;
case PRNTSW:
- printsw = true;
+ printsw = 1;
continue;
case NPRNTSW:
- printsw = false;
+ printsw = 0;
continue;
case LISTSW:
nmhdir = concat (m_maildir (""), "/", NULL);
/*
- * If we aren't working with the folder stack
- * (-push, -pop, -list) then the default is to print.
+ * If not directed via -print/-noprint, we print folder summary
+ * info unless if we're working with the folder stack (i.e.,
+ * -push, -pop, or -list).
*/
- if (!pushsw && !popsw && !listsw)
- printsw = true;
+ if (printsw == -1) {
+ printsw = !(pushsw || popsw || listsw);
+ }
/* Pushing a folder onto the folder stack */
if (pushsw) {
/*
* Print out folder information
*/
- print_folders();
+ if (printsw)
+ print_folders();
context_save (); /* save the context file */
done (0);