Random question (I have no clue of mutt or Unix shells (the code there looks like one)): But isn't that a problem of the receiving application? You can't really ask every single application that outputs text to sprout arguments to support every possible escaping that might be needed eventually. And whatever comes out of the `foo` part shouldn't be interpreted or parsed anyway, right?
how about
set my_pass="`pass email/[email protected]`"
[edit]
Looks like this is a muttrc line not a sh line. Sadly I don't think muttrc supports the far superior $() expansion..
THANK YOU! I love your tool and it is one of my favorite tools. I check your git for other cool stuff as I stumbled upon your stuff many times.
Question: would you want to add a parameter to escape non-aplhanumeric characters? It took me a while of playing to figure out how to get mutt to handle my very complex IMAP passwords.
For anyone who cares, I do it with sed.
set my_pass=`pass email/[email protected] | sed 's/[[:punct:]]/\\&/g'`
#