Question

I currently have this line in my muttrc file to add any address to my google contacts.

macro index,pager a "<pipe-message>goobook add<return>" "Add sender's address to your Google contacts"

Problem is that when it does that I have to then go in manually and erase the goobook cache file so that it re-downloads the new address I just added.

Is there a way in that command above to add at the end of goobook add command a file erase command to remove the goobook cache file?

Was it helpful?

Solution

Just figured it out, it took a lot and a lot more of searching but I finally found it. I have to use the <shell-escape> command.

Very simple and the final command looks like this:

macro index,pager a "<pipe-message>goobook add<return><shell-escape>rm -f ~/.goobook_cache<enter>" "Add sender's address to your Google contacts"

It works great actually, it add's the email to my Google Contacts then erases the old cache file. So immediately after adding an address I can find it in my mutt program.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top