leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
441 stars 48 forks source link

mscan reliance on stdin #208

Closed hallyn closed 3 years ago

hallyn commented 3 years ago

If I do 'mscan' after an 'mseq -S', it shows the sequence. If I do 'mscan < /dev/null', it shows nothing. If I do "mscan' again, it shows all messages again. I noticed this when running mscan inside a script launched through dmenu. Doing 'mseq | mscan' worked around it in that script, but this seemed unintentional based on the code.

leahneukirchen commented 3 years ago

No, this is intentional. Some mblaze tools check if input is a tty and do some useful default behavior then.

     If no msgs are specified, mscan reads filenames from the standard input,
     or scans the mails in the current sequence if used interactively.

You can use mscan : instead.

hallyn commented 3 years ago

Oh, thanks. I didn't know about ':'. I would open a PR to update the manpage, but I need to understand precisely how it's used first. I'll try to do that in the next few days (unless you say you don't want it).

hallyn commented 3 years ago

Oh, thanks. I didn't know about ':'. I would open a PR to update the manpage, but I need to understand precisely how it's used first. I'll try to do that in the next few days (unless you say you don't want it).

Oh I see. I suppose that's covered by the mmsg manpage.