char *datafile = NULL;
static char *rcfile = NULL;
+struct abook_output_item_filter selected_item_filter;
+
bool alternative_datafile = FALSE;
bool alternative_rcfile = FALSE;
*infile = "-",
*outfile = "-";
int c;
+ selected_item_filter = select_output_item_filter("muttq");
for(;;) {
int option_index = 0;
set_convert_var(informat);
break;
case OPT_OUTFORMAT:
- set_convert_var(outformat);
+ outformat = optarg;
+ selected_item_filter = select_output_item_filter(outformat);
break;
case OPT_INFILE:
set_convert_var(infile);
}
}
+ if(! selected_item_filter.func)
+ selected_item_filter = select_output_item_filter("muttq");
if(optind < argc) {
fprintf(stderr, _("%s: unrecognized arguments on command line\n"),
argv[0]);
}
putchar('\n');
while(i >= 0) {
- muttq_print_item(stdout, i);
+ e_write_item(stdout, i, selected_item_filter.func);
i = find_item(str, i + 1, search_fields);
}
}
};
struct abook_output_item_filter u_filters[] = {
+ { "muttq", N_("mutt alias"), muttq_print_item },
{ "\0", NULL }
};