Macro to apply on current mailbox

Kevin J. McCarthy kevin at 8t8.us
Mon Feb 15 17:43:39 UTC 2021


On Mon, Feb 15, 2021 at 10:35:25AM +0100, Angel M Alganza wrote:
>	# Need to upgrade to > 1.8.0 (setenv)
>	folder-hook . 'set my_folder=$folder;set folder="XXX";set visual=^'
>	folder-hook . 'setenv MYSYNCFOLDER $visual'
>	folder-hook . 'set folder=$my_folder'
>	macro index \! "!/usr/bin/mbsync \$MYSYNCFOLDER\n"

You've overridden <shell-escape>, bound to '!' by default, with your 
macro.  But then you are trying to use '!' inside the macro.  That's a 
loop - instead of calling <shell-escape> you are calling your macro 
inside the macro.

Try (untested):
   macro index \! "<shell-escape>/usr/bin/mbsync \$MYSYNCFOLDER\n"

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20210215/a271bc9e/attachment-0001.asc>


More information about the Mutt-users mailing list