Piping to a script and receiving commands/variables back

David Woodfall dave at dawoodfall.net
Mon Mar 12 23:32:24 UTC 2018


Hello,

I've made a shell script that I pipe via a key bind. It parses for
email address and writes a new procmail rule based on that and the
name of a folder that I enter on the CLI.

It works OK, but I'd like to send the name of the folder back to mutt
and have it save the message there afterwards.

I've kind of got it working by echoing commands to a tmp file and then
have mutt source it:

echo "push <save-message>=$folder<return><sync-mailbox>" \
  > /tmp/newfolder

I'd much rather know if there's a better way of doing it.

Thanks


More information about the Mutt-users mailing list