Jim Breton <[EMAIL PROTECTED]> wrote on Tue, 29 Feb 2000:
> There are a few solutions I can think of and I'm wondering if anyone
> could advise me on which one might be best, or hopefully suggest a
> better one.

First of all, I'd recommend the approach to getting fetchmail.  In the
daemon mode, it'll automatically fetch email in the background and you
won't notice anything (except that the line is busy with some traffic...).

> but that didn't work too well.  Apparently macros only work for
> stringing Mutt keystrokes?

Yes.  If you want to invoke a shell command, you need to do it with the
!-command, which you can easily include in a macro, and which is fully
supported.  Like you thought.

> I could suppress the output by redirecting it to /dev/null but
> that seems awfully kludgey (sp?) to me.

It isn't...  I think it's standard behaviour anywhere in little scripts
and such in unix to redirect output to /dev/null if it shouldn't be
displayed. :-)  I think that's the most common use for /dev/null, so I
could even say that "that's what /dev/null is for!" (even if the point
is arguable...).  You shouldn't be scared of doing it like that.

If you want to save the output in case there are some errors or
something, save it to a temporary file instead.

> The other idea was to bind a key to a shell command (!) that ran a shell
> script that did the output suppression, etc. for me but that's
> essentially the same as above, just a little fancier.

That's what I'd do.  I don't think it's a kludgey solution either.  It's
just a question of setting up your environment so that it works the way
you want; adding a simple shell script that will get you there is
something I certainly consider normal in the unix environment.

If you added a shell script, you could do some post-processing on the
log (if you saved it to a temp file) and then do whatever was needed if
there were some errors or whatnot.  Or you could even just mail the log
to yourself...

> Any other ideas?  Is there any way to bind a key directly to a shell
> command, or do I have to use the ! function?

No, you really have to use the ! function.  That's the way it was
intended to be done.

I really recommend you try fetchmail though, in the daemon mode.


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
2 + 2 = 4 (for the time being)

Reply via email to