The shell script sounds like a good idea; I'm trying to implement it but
I'm getting a funny error when I try to execute this:

macro attach o ":pipe-entry\ncat > /tmp/001 ; sz /tmp/001\n" "Send file"

  It's saying "key is not bound" when a quick check of the "?" help screen
shows clearly that it is.
  In other news, I tried the shell script idea but this block of code I
have isn't working right either:

while read LINE; do
 echo >> $TMPFILE "${LINE}";
done

  Obviously there is more to the script than that, but that's the part
that's failing; *some* file is being written, but for binary files, the
output is only about 3% of the size of the source (text files seem to work
fine though).
  Either one of these plans would work fine for me, although the shell
script is probably preferable since it seems to be more robust and
applicable to other things.  Any ideas?

On Thu, Aug 31, 2000 at 04:39:31PM -0700, Michael Elkins wrote:
>On Thu, Aug 31, 2000 at 08:04:23AM -0500, John Buttery wrote:
>>   Basically, the end result is that if I have a file called
>> "stressre1.exe" (for example) attached to an email, I can write a macro
>> that when invoked will do "sz stressre1.exe" as if I had saved the
>> attachment, exited mutt, and typed that at the shell.
>
>This is not currently possible.  I'm not even sure how you would script that
>sort of functionality either, because you'd have to have some language
>constructs that say 'get-me-the-name-of-message-102-attachment-1', which
>would be rather difficult.  Your best bet is to just create a shell script
>which does this that you can pipe a file to and executes what command you
>want.  You can just pick a temporary file name.
>
>me

Reply via email to