Last active
January 25, 2022 10:58
-
-
Save manolomartinez/7082024 to your computer and use it in GitHub Desktop.
Use ranger to save attachments in mutt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use ranger to save attachment | |
macro attach S "<pipe-message>/path/to/muttsaveattach.sh"<enter> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
urxvt -e ranger --choosefile=/tmp/muttattach | |
cat > $"`cat /tmp/muttattach`" |
This script wouldn't work for me until I edited muttsaveattach.sh by removing $ from line 3. After this edit it works perfectly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add the
.muttrc
line to, well, your.muttrc
. Then pressing "S" in the attachment menu will bring up a ranger instance. In ranger, navigate to the directory where you want to save your file and:touch <nameoftheattachment>
, select the file you've just touched, press enter and mutt will save the attachment to that file.