Github messages for mblaze
 help / color / mirror / Atom feed
From: rakoo <rakoo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Improve attachments handling
Date: Wed, 24 Apr 2024 18:58:18 +0200	[thread overview]
Message-ID: <20240424165818.5004524ABE@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-fa6558a0-26e0-48f6-803f-f5a8af34f6a8-mblaze-234@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

There is an updated pull request by rakoo against master on the mblaze repository

https://github.com/rakoo/mblaze master
https://github.com/leahneukirchen/mblaze/pull/234

Improve attachments handling
I had to manually explore to understand how to add attachments, the man page was a bit evasive. It also didn't help that a `~` at the beginning of the path isn't caught, so I added the same treatment as outbox parsing.

Thanks for this fantastic piece of software, the joys of building one's own MUA in ~150 lines of shell scripts...

A patch file from https://github.com/leahneukirchen/mblaze/pull/234.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-234.patch --]
[-- Type: text/x-diff, Size: 1020 bytes --]

From 601189ea2c1d64a86f1851739254494c74c25416 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Wed, 24 Apr 2024 18:47:46 +0200
Subject: [PATCH] contrib/mmailto: Fix using longer arguments

We put the args to $TERMINAL inside single quotes for terminals that want a single command,
and we put arguments extracted from the adress between double quotes to protect from spaces
---
 contrib/mmailto | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/mmailto b/contrib/mmailto
index 7feabb4..2b38def 100755
--- a/contrib/mmailto
+++ b/contrib/mmailto
@@ -19,7 +19,7 @@ fi
 IFS='
 '
 
-exec $TERMINAL -e mcom $(
+args=$(
 awk -v url="$1" '
 
 function decode(s) {
@@ -47,7 +47,7 @@ BEGIN {
     split(fields[i], kv, "=")
     if (kv[1] != "r") {
       args[length(args)+1] = "-" kv[1]
-      args[length(args)+1] =  kv[2]
+      args[length(args)+1] =  "\"" kv[2] "\""
     }
   }
   for (i in args) {
@@ -56,3 +56,5 @@ BEGIN {
 }
 '
 )
+
+exec $TERMINAL -e "mcom $args"

  parent reply	other threads:[~2024-04-24 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 14:39 [PR PATCH] " rakoo
2023-02-27 14:47 ` leahneukirchen
2023-04-12 14:45 ` [PR PATCH] [Updated] " rakoo
2023-05-23 22:47 ` Eolien55
2023-11-11  2:07 ` [PR PATCH] [Updated] " rakoo
2023-11-24 12:55 ` rakoo
2024-04-24 16:51 ` rakoo
2024-04-24 16:54 ` rakoo
2024-04-24 16:58 ` rakoo [this message]
2024-04-24 17:02 ` [PR PATCH] [Closed]: " rakoo
2024-04-24 17:02 ` rakoo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240424165818.5004524ABE@inbox.vuxu.org \
    --to=rakoo@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).