Github messages for mblaze
 help / color / mirror / Atom feed
* [PR PATCH] contrib/mmailto: Fix using longer arguments
@ 2024-04-24 17:05 rakoo
  2024-06-06 11:12 ` [PR PATCH] [Updated] " rakoo
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rakoo @ 2024-04-24 17:05 UTC (permalink / raw)
  To: ml

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

There is a new pull request by rakoo against master on the mblaze repository

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

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.

This is necessary for `xfce4-terminal` for example, and doesn't break `xterm`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-258.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"

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-09-12 12:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 17:05 [PR PATCH] contrib/mmailto: Fix using longer arguments rakoo
2024-06-06 11:12 ` [PR PATCH] [Updated] " rakoo
2024-06-06 11:25 ` rakoo
2024-09-05 12:13 ` rakoo
2024-09-11 19:48 ` leahneukirchen
2024-09-11 23:13 ` rakoo
2024-09-12 11:39 ` leahneukirchen
2024-09-12 12:10 ` rakoo

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).