Open guludo opened 1 year ago
Shouldn't this default to true
? when would you ever want these escape codes when piping stuff into other tools?
Shouldn't this default to
true
?
I agree that would be a better default. I just wanted to make sure I didn't break other people's workflow.
when would you ever want these escape codes when piping stuff into other tools?
I guess one use case is when using another program to view the email. One could, for example, pipe it to less -R
.
Anyways, let me know if you prefer true
to be the default, then I'll send a new version here.
Can you explain the use case for this? I mean, I have never seen these sequences in actual message contents and only ever added them for displaying stuff on the terminal.
For me, the use case was to apply a patch directly from the mail client.
But do the patch files you receive really have any ansi characters in them? That's what's confusing me here..
Quoting Gustavo José de Sousa (2023-07-26 14:38:50)
For me, the use case was to apply a patch directly from the mail client.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.*Message ID: <pazz/alot/pull/1619/ @.***>
But do the patch files you receive really have any ansi characters in them?
No, they do not. The issue is that I have a mailcap entry that colorizes the patch. When I use pipe_to, the content with the added escapes is what is piped.
Thanks for clarifying. I think there is something wrong with the pipeto command then: I believe it should only send the content of the mime part, not what has been piped through the mailcap entry. Will have to look into this at some point. Cheers!
Quoting Gustavo José de Sousa (2023-07-26 18:40:12)
But do the patch files you receive really have any ansi characters in them?
No, they do not. The issue is that I have a mailcap entry that colorizes the patch. When I use pipe_to, the content with the added escapes is what is piped.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.*Message ID: <pazz/alot/pull/1619/ @.***>
If someone has a mailcap entry that colors the mail content, it is possible that she would want to get the content without the CSI escapes when piping it an external command.
Ideally, there should be a way to have the content untouched by the mailcap filter so we could use it when it makes sense. However, let's use ansi.remove_csi() for the time being.