-a attach a file to a message
-b specify a blind carbon-copy (BCC) address
-c specify a carbon-copy (Cc) address
+-D print the value of all mutt variables to stderr
-e specify a config command to be run after initilization files are read
-f specify a mailbox to load
-F specify an alternate file to read initialization commands
return 0;
}
+/* dump out the value of all the variables we have */
+int mutt_dump_variables (void)
+{
+ int i;
+
+ char errbuff[STRING];
+ char command[STRING];
+
+ BUFFER err, token;
+
+ memset (&err, 0, sizeof (err));
+ memset (&token, 0, sizeof (token));
+
+ err.data = errbuff;
+ err.dsize = sizeof (errbuff);
+
+ for (i = 0; MuttVars[i].option; i++)
+ {
+ snprintf (command, sizeof (command), "set ?%s\n", MuttVars[i].option);
+ if (mutt_parse_rc_line (command, &token, &err) == -1)
+ {
+ fprintf (stderr, "%s\n", err.data);
+ FREE (&token.data);
+ return 1;
+ }
+ printf("%s\n", err.data);
+ }
+
+ FREE (&token.data);
+ return 0;
+}
+
char *mutt_getnamebyvalue (int val, const struct mapping_t *map)
{
int i;
"usage: mutt [ -nRyzZ ] [ -e <cmd> ] [ -F <file> ] [ -m <type> ] [ -f <file> ]\n\
mutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -Q <query> [ -Q <query> ] [...]\n\
mutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -A <alias> [ -A <alias> ] [...]\n\
+ mutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -D\n\
mutt [ -nx ] [ -e <cmd> ] [ -a <file> ] [ -F <file> ] [ -H <file> ] [ -i <file> ] [ -s <subj> ] [ -b <addr> ] [ -c <addr> ] <addr> [ ... ]\n\
mutt [ -n ] [ -e <cmd> ] [ -F <file> ] -p\n\
mutt -v[v]\n\
-a <file>\tattach a file to the message\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 stderr\n\
-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\
int version = 0;
int i;
int explicit_folder = 0;
+ int dump_variables = 0;
extern char *optarg;
extern int optind;
memset (Options, 0, sizeof (Options));
memset (QuadOptions, 0, sizeof (QuadOptions));
- while ((i = getopt (argc, argv, "A:a:b:F:f:c:d:e:H:s:i:hm:npQ:RvxyzZ")) != EOF)
+ while ((i = getopt (argc, argv, "A:a:b:F:f:c:Dd:e:H:s:i:hm:npQ:RvxyzZ")) != EOF)
switch (i)
{
case 'A':
msg->env->cc = rfc822_parse_adrlist (msg->env->cc, optarg);
break;
+ case 'D':
+ dump_variables = 1;
+ break;
+
case 'd':
#ifdef DEBUG
debuglevel = atoi (optarg);
}
/* Check for a batch send. */
- if (!isatty (0) || queries || alias_queries)
+ if (!isatty (0) || queries || alias_queries || dump_variables)
{
set_option (OPTNOCURSES);
sendflags = SENDBATCH;
if (queries)
return mutt_query_variables (queries);
+ if (dump_variables)
+ return mutt_dump_variables();
if (alias_queries)
{
int mutt_copy_body (FILE *, BODY **, BODY *);
int mutt_decode_save_attachment (FILE *, BODY *, char *, int, int);
int mutt_display_message (HEADER *h);
+int mutt_dump_variables (void);
int mutt_edit_attachment(BODY *);
int mutt_edit_message (CONTEXT *, HEADER *);
int mutt_fetch_recips (ENVELOPE *out, ENVELOPE *in, int flags);