Hello,

On Tue, Dec 26, 2017 at 03:23:50PM +0000, Arkadiusz Drabczyk wrote:
On Tue, Dec 26, 2017 at 06:36:20AM +0800, Yubin Ruan wrote:
Hi,

I have a folder hook like this:

    folder-hook =somembox 'push "!touch /tmp/\1-touched\n"'

where I would like to create a file "/tmp/somebox-touched" when I select and
enter a mailbox. As you can see, \1 here should represent the name of the mbox
(as in many Regex). Is there a way to do this so that I do not have to write
rules for all the mbox one by one?

Like that:

folder-hook . 'set my_oldrecord=$record; set record=^; set my_folder=$record; 
set record=$my_oldrecord'
folder-hook . 'push "!touch /tmp/${my_folder}-touched\n"'

Thanks for sharing such an interesting approach. How can it be extended to remove the '=' starting character? I've tried to do following:

folder-hook . 'set my_oldrecord=$record; set record=^; set my_folder=`echo 
$record | sed s/=//`; set record=$my_oldrecord'

But unfortunately it doesn't work for some reason.

--
Cheers,
Oleg A. Mamontov

mailto: [email protected]

skype:  lonerr11
cell:   +7 (903) 798-1352

Reply via email to