<<< Date Index >>>     <<< Thread Index >>>

more verbose and "correcter" usage output



Moggeen,

the attachment adjusts the usage output to reduce ambiguities and
give some more clues about cmd-line invocation (close a ticket I
opened, will have to find it). I unshifted the "mutt ..." lines
because I had to add some chars on the longest one.

Also, when compiled without debug, then give advice (how) to get it.

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.
--- morg/main.c Wed Apr 11 09:00:10 2007
+++ mgo/main.c  Sat Apr 14 16:24:25 2007
@@ -104,47 +104,52 @@
 {
   puts (mutt_make_version ());
 
-  puts _(
-"usage: mutt [<options>] [-z] [-f <file> | -yZ]\n\
-       mutt [<options>] [-x] [-Hi <file>] [-s <subj>] [-bc <addr>] [-a <file> 
[...]] [--] <addr> [...]\n\
-       mutt [<options>] -p\n\
-       mutt [<options>] -A <alias> [...]\n\
-       mutt [<options>] -Q <query> [...]\n\
-       mutt [<options>] -D\n\
-       mutt -v[v]\n");
+  puts _( "usage: mutt -v[v]\n\
+     mutt [<options>] -p\n\
+     mutt [<options>] -A <alias> [...]\n\
+     mutt [<options>] -Q <query> [...]\n\
+     mutt [<options>] -D\n\
+     mutt [<options>] -y\n\
+     mutt [<options>] -Z\n\
+     mutt [<options>] -z [-f <file>]\n\
+     mutt [<options>] [-x] [-H|-i <file>] [-s <subj>] [-b|-c <addr>] [-a 
<file> [...]] [--] <addr> [...]\n\
+to send from cmd-line in batch-mode (no user-interaction, note no -H or -i):\n\
+     echo text | mutt [<options>] [-x] [-s <subj>] [-b|-c <addr>] [-a <file> 
[...]] [--] <addr> [...]\n\
+     mutt [<options>] [-x] [-s <subj>] [-b|-c <addr>] [-a <file> [...]] [--] 
<addr> [...] < body-file\n"
+);
 
   puts _("\
-options:\n\
+  -v\t\tshow version and compile-time definitions\n\
+  -p\t\trecall a postponed message\n\
   -A <alias>\texpand the given alias\n\
-  -a <file>\tattach a file to the message\n\
+  -Q <variable>\tquery a configuration variable\n\
+  -D\t\tprint the value of all variables to stdout\n\
+  -y\t\tselect a mailbox specified in your `mailboxes' list\n\
+  -Z\t\topen the first folder with new message, exit immediately if none\n\
+  -z\t\texit immediately if there are no messages in the mailbox\n\
+  -x\t\tsimulate the mailx send mode\n\
+  -H <file>\tspecify a draft file to read header and body from\n\
+  -i <file>\tspecify a file which Mutt should include in the body\n\
+  -s <subj>\tspecify a subject (must be in quotes if it has spaces)\n\
   -b <address>\tspecify a blind carbon-copy (BCC) address\n\
   -c <address>\tspecify a carbon-copy (CC) address\n\
-  -D\t\tprint the value of all variables to stdout");
+  -a <file>\tattach a file to the message,\n\
+\t\twhen using with multiple filenames, then using -- is mandatory\n\n\
+options:");
 #if DEBUG
   puts _("  -d <level>\tlog debugging output to ~/.muttdebug0");
+#else
+  puts _("  debugging is disabled, please rebuild with --enable-debug to get 
-d option");
 #endif
   puts _(
 "  -e <command>\tspecify a command to be executed after initialization\n\
-  -f <file>\tspecify which mailbox to read\n\
   -F <file>\tspecify an alternate muttrc file\n\
-  -H <file>\tspecify a draft file to read header and body from\n\
-  -i <file>\tspecify a file which Mutt should include in the body\n\
-  -m <type>\tspecify a default mailbox type\n\
   -n\t\tcauses Mutt not to read the system Muttrc\n\
-  -p\t\trecall a postponed message");
-  
-  puts _("\
-  -Q <variable>\tquery a configuration variable\n\
+  -f <file>\tspecify which mailbox to read\n\
+  -m <type>\tspecify a default mailbox type\n\
   -R\t\topen mailbox in read-only mode\n\
-  -s <subj>\tspecify a subject (must be in quotes if it has spaces)\n\
-  -v\t\tshow version and compile-time definitions\n\
-  -x\t\tsimulate the mailx send mode\n\
-  -y\t\tselect a mailbox specified in your `mailboxes' list\n\
-  -z\t\texit immediately if there are no messages in the mailbox\n\
-  -Z\t\topen the first folder with new message, exit immediately if none\n\
   -h\t\tthis help message");
-  puts _("  --\t\ttreat remaining arguments as addr even if starting with a 
dash\n\
-\t\twhen using -a with multiple filenames using -- is mandatory");
+  puts _("  --\t\ttreat remaining arguments as addr even if starting with a 
dash");
 
   exit (0);
 }