Re: How do you map shell commands to keys in mutt ?
Brian Clark wrote:
> * Karsten M. Self (kmself@ix.netcom.com) [Dec 26. 2001 15:04]:
>
> > ## Bind ricochet spam response to 'S'
> > macro index S "|/usr/local/bin/ricochet & \n"
>
> Note, for some versions of Mutt, or some systems, or some planets,
> one may have to use <pipe-message>, as in:
>
> ## Bind ricochet spam response to 'S'
> macro index S "<pipe-message>/usr/local/bin/ricochet & \n"
Does it really work to run the program in the background? I use
spamassassin so my command is:
macro index R "|spamassassin -r\n"
I'd love to run that in the background, but my tests tell me it won't
work. If I make a program called savetofoo:
#!/bin/sh
rm -f ~/foo
cat > ~/foo
I can pipe a message into it ("|~/savetofoo") and sure enough, it's saved
to foo. If I background that though ("|~/savetoofoo &"), it just creates
a zero length file. This matches how I would expect it to behave; when a
the shell backgrounds a process, it does not give it a chance to read
any pending input on stdin.
--
see shy jo
Reply to: