<<< Date Index >>>     <<< Thread Index >>>

Re: Howto run a command in message hooks



Hi Christian,

On Wed, Oct 24, 2007 at 04:56:13PM +0200, Christian Brabandt wrote:
> Do you mind formating your message with a width < 80 chars?

no, thats no problem.

> Depending on what your want try either <shell-escape> or <pipe-message>

Hm. That and what Dave Evans wrote works, at least partially. Now the
script is launched, but it does not work as expected.  It starts the
script which outputs:

User has asked for a return receipt. Send one? ([yes]/no): 

and waits for an input ("read yn"), but mutt adds its "Press any key to
continue...". So it seems that mutt already answers the question (what
it shouldn't do). Also if I do press return to that question, it
restarts the script and the game starts from the beginning. Endless,
until i somehow force it to quit (not that easy).

The (for now very basic script):
#!/bin/sh

TEMP="`mktemp`"
trap "rm -f $TEMP" INT ABRT EXIT
tee > $TEMP

QUESTION="User has asked for a return receipt. Send one? ([yes]/no): "
echo -n $QUESTION
read yn

(I know that this is far from beeing complete, but to test how things
would work it is enough)

Any hints?

Regards,
Patrick