pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
700 stars 163 forks source link

commands/thread/open-attachment: add command #1505

Open pacien opened 4 years ago

pacien commented 4 years ago

This allows the user to open an attachment file with a program of their choice.

GitHub: closes #1494

pazz commented 4 years ago

I'd rather not call this command open because it may be confused with unfolding a message. How's view ? open-attachment ?

pacien commented 4 years ago

Amended to rename the command to "open-attachment".

pazz commented 4 years ago

I feel like I have implemented a very similat logic in alot.commands.globals.EditCommand. Perhaps we should rather subclass that to recycle code?

pacien commented 4 years ago

The EditCommand and OpenAttachmentCommand implementations do not seem to share much in common: the way the file path is substituted in the command differs with mailcap templates.