Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been trying to figure out how to start Mutt in such a way that it's just like starting up an interactive Mutt and creating a new email, then copying the output of git request-pull into the body (to be able to edit it manually). git request-pull HEAD https://... | mutt -i- invalid@example.org doesn't work - It just exits with exit code 0 and no message at all, and I'm not even sure if anything was sent, because there's no copy of the email in the standard sent folder.

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

I assume you want to edit the mail before it is sent? In that case piping is not going to work because mutt receives an EOF when the pipe closes. Either use an actual file or use process substitution, a ksh93 feature also available in bash and zsh, e.g.:

mutt -i<(git request-pull HEAD https://...) -s SUBJECT invalid@example.org
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.