* On 17 Apr 2012, Derek Martin wrote: > On Tue, Apr 17, 2012 at 11:46:15AM -0300, Andrei Mikhailov wrote: > > I would expect that this command: > > > > echo mymaildir | xargs mutt -f > > > > be equivalent to: > > > > mutt -f mymaildir > > > > But instead, mutt complains about ``no recipient specified''. > > Please help me to figure this out! > > The problem here is that when you run it this way, Mutt's stdin is not > a terminal. When that's the case, mutt expects you're composing a > message on the command line, and will complain when you don't provide > it enough options to specify the message envelope: > > $ mutt -f Mailbox < /dev/null > No recipients were specified. > > For the UI to work, stdin must be a terminal, so that mutt (or rather, > whichever terminal control library it uses) knows what to send to the > terminal to draw the screen, etc. AFAIK there's no way around that.
TTY=$(tty); echo mymaildir | xargs -I{} sh -c "mutt -f '{}' <$TTY" -- David Champion • d...@uchicago.edu • IT Services • University of Chicago
pgpAVfAbUUNu0.pgp
Description: PGP signature