Correct syntax of send hook
Greetings List. I'm trying to add this command: vim -c ':r !cat /tmp/file' to be used in a send hook : send-hook ~t...@domain.com set editor= vim ':r !cat /tmp/bla' The contents of /tmp/file should then be 'cat ' into the new email. While the above works fine from the main declaration in my muttrc (set editor=)_, I can't seem to hit it with the right syntax in the send hook. Your help is appreciated. -- GG
Re: Correct syntax of send hook
Hi Guy! On Do, 08 Mai 2014, Guy Gold wrote: Greetings List. I'm trying to add this command: vim -c ':r !cat /tmp/file' to be used in a send hook : send-hook ~t...@domain.com set editor= vim ':r !cat /tmp/bla' The contents of /tmp/file should then be 'cat ' into the new email. While the above works fine from the main declaration in my muttrc (set editor=)_, I can't seem to hit it with the right syntax in the send hook. Your help is appreciated. I am surprised, this works for your normal editor command. From my understanding, Vim should try to open 2 files, namely ':r !cat /tmp/bla' and the /tmp/mutt-... (which is your actual mail template. To make this work, you should at least add the -c command to vim, to make sure, you want the argument be interpreted as a command to execute on startup. regards, Christian -- I'm a soldier, not a diplomat. I can only tell the truth. -- Kirk, Errand of Mercy, stardate 3198.9
Re: Correct syntax of send hook
On Fri,May 09 12:24:AM, Christian Brabandt wrote: I am surprised, this works for your normal editor command. From my understanding, Vim should try to open 2 files, namely ':r !cat /tmp/bla' and the /tmp/mutt-... (which is your actual mail template. To make this work, you should at least add the -c command to vim, to make sure, you want the argument be interpreted as a command to execute on startup. Hi Christian, Yes, you are right, and I forgot to place '-c' in the macro I posted on the email, but - I do have it in the actual macro in vimrc. The reason I'm using the !cat option is - like you mentioned, if I only use :r /tmp/file, then, things get 'messed' up. And, while in mutt, I find out that I'm editing two files, not good.. The usage of -c ':r !cat /tmp/file' does solve the issue of editing two files, but, I cannot seem to get the send-hook correct, and depending on how/where I place my quotes, I get different errors. - Which is troubling, because I do have other send-hooks defined and working well. -- GG
[no subject]
approve 48zvVL unsubscribe mutt-dev shawnzaiderm...@gmail.com