* On 2002.04.24, in <20020424212120.GA7108@bernard>,
* "Bernard Massot" <[EMAIL PROTECTED]> wrote:
> > set attribution="if [ %[%w] = 1 ]; then echo -n \"D'al %%d, %%n en deus
>skrivet:%%\"; else echo -n \"D'ar %%d, %%n en deus skrivet:%%\"; fi |"
> >
> It works, thank you !
> But I want it to apply in a send-hook. How can quote it properly ?
> I tried different combinations of simple quotes, double quotes and
> backskashes, but no one worked.
Two ideas:
1. Place this set command in a separate file -- say,
~/.muttrc-brezhoneg. Put your current setting in
~/.muttrc-english. Set these send-hooks:
send-hook . "source ~/.muttrc-english"
send-hook [EMAIL PROTECTED] "source ~/.muttrc-brezhoneg"
OR:
2. Place the shell stuff in a separate script:
--- SNIP ----
#!/bin/sh
if [ $1 = 1 ]; then
echo -n "D'al %d, %n en deus skrivet:%"
else
echo -n "D'ar %d, %n en deus skrivet:%"
fi
--- SNIP ----
And call this script from your send-hook to simplify
quoting:
send-hook . "set attribution='normal attribution'"
send-hook [EMAIL PROTECTED] "set attribution='script.sh %[%w] |'"
You can get fancier, but either of those should basically work.
--
-D. [EMAIL PROTECTED] NSIT University of Chicago