mscan: default to all messages when interactive w/o args

This commit is contained in:
Christian Neukirchen 2016-07-20 15:38:00 +02:00
parent 3c012d3a96
commit bf912ab920

11
mscan.c
View File

@ -167,9 +167,14 @@ main(int argc, char *argv[])
blaze822_seq_load(seqmap); blaze822_seq_load(seqmap);
cur = blaze822_seq_cur(); cur = blaze822_seq_cur();
int i = blaze822_loop(argc-1, argv+1, oneline); long i;
if (argc == 1 && isatty(0)) {
fprintf(stderr, "%d mails scanned\n", i); char *all[] = { ":" };
i = blaze822_loop(1, all, oneline);
} else {
i = blaze822_loop(argc-1, argv+1, oneline);
}
fprintf(stderr, "%ld mails scanned\n", i);
return 0; return 0;
} }