pazz / alot

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

Clean way to abort command in pre hook #1501

Open flupe opened 4 years ago

flupe commented 4 years ago

Hi all, I just discovered alot and so far it has been really good. I was reading about custom pre-command hooks and adding the "confirm send without attachment" hook to my config. It works quite well, and since #394 you can safely abort command from pre-command hooks.

My issue is related to the ui: when the send command is aborted, a large red box appears showing that something bad happened and that one has to check the logs. In the case of the "confirm attachment" hook, the abort is intended and not an error.

Could we have a special Exception type for aborting commands that is not reported as an error to the user?

pazz commented 4 years ago

Welcome to alot :)

I second this. If your abort the send-command then there should not be any error notification. I'm surprised this happens and consider it a bug.