On Friday 18 May 2018 18:22,
Dave Woodfall <d...@dawoodfall.net> put forth the proposition:
When using hooks I find that I sometimes have problems with using
'set' and some variables that need quoting or escaping.

eg: the following work:

folder-hook =Sent 'set index_format="%3C %[!%d/%m/%y] %-15.15F %s"'
folder-hook =Folk 'set editor="vim +\':call Mailer()\' %s"'

However I'm having problems with this line:

reply-hook .* 'set editor="vim +\':call Mailer()\' %s"'

No matter how I quote/escape it I always get an error. Either
something in the lines of '+:call: unknown variable' or 'sh -c
unexpected '('' I don't know why this works with folder-hook but not
with reply-hook.

My usual way out of these situations is to put such commands in a
file and have a hook source it, but to make a file for just one
command just seems wrong.

Any ideas?
How do you guys cope with situations like this?

Answering my own question. This works:

reply-hook .* "set editor='vim +\":call ListMailer()\" %s'"

I reversed the single and double quotes.

-Dave

--

Please don't reply directly to me or CC me.

The linuX Files -- The Source is Out There.
 -- Sent in by Craig S. Bell, g...@aracnet.com

 .-.     .-.     .-.     .-.     .-.     .-.     .-.     .-.     .-.
.'   `._.'   `._.'   `._.'   `._.'   `._.'   `._.'   `._.'   `._.'   `.

Reply via email to