* [PR PATCH] Improve attachments handling
@ 2023-02-27 14:39 rakoo
2023-02-27 14:47 ` leahneukirchen
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: rakoo @ 2023-02-27 14:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 619 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/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: 1454 bytes --]
From 518b29b3d1c424584c8c88a9319f9feac9123651 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Mon, 27 Feb 2023 15:27:03 +0100
Subject: [PATCH 1/2] mcom: Allow tilde in attachment
---
mcom | 1 +
1 file changed, 1 insertion(+)
diff --git a/mcom b/mcom
index 397cb5f..7258266 100755
--- a/mcom
+++ b/mcom
@@ -84,6 +84,7 @@ do_mime() {
IFS=$NL
msed '/attach/d' "$draft"
for f in $(mhdr -M -h attach "$draft"); do
+ f=$(echo $f | sed "s:^~/:$HOME/:")
printf '#%s %s\n' \
"$(file -Lb --mime "$f" | sed 's/ //g')" \
"$f"
From d15f2af0bdf178b35329aa1c554d85de37a2c817 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Mon, 27 Feb 2023 15:33:13 +0100
Subject: [PATCH 2/2] mcom: Document how attachments work
---
man/mcom.1 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/man/mcom.1 b/man/mcom.1
index 957c322..08592c7 100644
--- a/man/mcom.1
+++ b/man/mcom.1
@@ -130,6 +130,13 @@ Delete the draft and quit.
Preview the draft, using
.Xr mshow 1 .
.El
+.Sh ATTACHMENTS
+From within the editor, attachments are added by setting an Attach: header with the path to the desired files. Multiple Attach: headers can be added.
+
+To add from the commandline, use
+.Sq mcom Fl attach No path/to/file
+and the header will be added automatically.
+It is possible to use tilde (~) in the file path.
.Sh ENVIRONMENT
.Bl -tag -width Ds
.It Ev EDITOR , Ev VISUAL
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
@ 2023-02-27 14:47 ` leahneukirchen
2023-04-12 14:45 ` [PR PATCH] [Updated] " rakoo
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2023-02-27 14:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/234#issuecomment-1446464780
Comment:
Good idea. Will require a few tweaks to be more robust but thanks for bringing this up.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Updated] Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
2023-02-27 14:47 ` leahneukirchen
@ 2023-04-12 14:45 ` rakoo
2023-05-23 22:47 ` Eolien55
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2023-04-12 14:45 UTC (permalink / raw)
To: ml
[-- 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: 1454 bytes --]
From 307cb0a40b2b6a30af7b42bf850be735de9378c3 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Mon, 27 Feb 2023 15:27:03 +0100
Subject: [PATCH 1/2] mcom: Allow tilde in attachment
---
mcom | 1 +
1 file changed, 1 insertion(+)
diff --git a/mcom b/mcom
index 397cb5f..7258266 100755
--- a/mcom
+++ b/mcom
@@ -84,6 +84,7 @@ do_mime() {
IFS=$NL
msed '/attach/d' "$draft"
for f in $(mhdr -M -h attach "$draft"); do
+ f=$(echo $f | sed "s:^~/:$HOME/:")
printf '#%s %s\n' \
"$(file -Lb --mime "$f" | sed 's/ //g')" \
"$f"
From 0d5395e934a0e86ba99481f5b18e3e0f28e703ce Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Mon, 27 Feb 2023 15:33:13 +0100
Subject: [PATCH 2/2] mcom: Document how attachments work
---
man/mcom.1 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/man/mcom.1 b/man/mcom.1
index 957c322..08592c7 100644
--- a/man/mcom.1
+++ b/man/mcom.1
@@ -130,6 +130,13 @@ Delete the draft and quit.
Preview the draft, using
.Xr mshow 1 .
.El
+.Sh ATTACHMENTS
+From within the editor, attachments are added by setting an Attach: header with the path to the desired files. Multiple Attach: headers can be added.
+
+To add from the commandline, use
+.Sq mcom Fl attach No path/to/file
+and the header will be added automatically.
+It is possible to use tilde (~) in the file path.
.Sh ENVIRONMENT
.Bl -tag -width Ds
.It Ev EDITOR , Ev VISUAL
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling 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
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Eolien55 @ 2023-05-23 22:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New comment by Eolien55 on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/234#issuecomment-1560224096
Comment:
What is the status on this pull request?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Updated] Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
` (2 preceding siblings ...)
2023-05-23 22:47 ` Eolien55
@ 2023-11-11 2:07 ` rakoo
2023-11-24 12:55 ` rakoo
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2023-11-11 2:07 UTC (permalink / raw)
To: ml
[-- 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: 798 bytes --]
From f17006eeb909f2a881ebf155485c3fb703fc5825 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Sat, 11 Nov 2023 02:01:19 +0100
Subject: [PATCH] Attach all files when forwarding in raw mode
---
mcom | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/mcom b/mcom
index 4e834c6..7981f65 100755
--- a/mcom
+++ b/mcom
@@ -306,6 +306,18 @@ fi
msgid
museragent
cat "$MBLAZE/headers" 2>/dev/null
+ if [ -n "$raw" ]; then
+ prev=$(pwd)
+ attachdir=$(mktemp -d)
+ cd $attachdir
+ mseq -r "$@" \
+ | xargs -I {} mshow -Bx {} \
+ | IFS=$NL xargs realpath \
+ | sed 's/^/Attach: /'
+ cd $prev
+ trap 'rm -r "$attachdir"' EXIT
+ fi
+
printf '\n\n'
if [ -z "$raw" ]; then
mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Updated] Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
` (3 preceding siblings ...)
2023-11-11 2:07 ` [PR PATCH] [Updated] " rakoo
@ 2023-11-24 12:55 ` rakoo
2024-04-24 16:51 ` rakoo
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2023-11-24 12:55 UTC (permalink / raw)
To: ml
[-- 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: 1367 bytes --]
From 216be7d5f2f2ec120adb3f9aa4728b01eb48f0fe Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Sat, 11 Nov 2023 02:01:19 +0100
Subject: [PATCH 1/2] Attach all files when forwarding in raw mode
---
mcom | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/mcom b/mcom
index 4e834c6..e62b759 100755
--- a/mcom
+++ b/mcom
@@ -306,6 +306,19 @@ fi
msgid
museragent
cat "$MBLAZE/headers" 2>/dev/null
+ if [ -n "$raw" ]; then
+ prev=$(pwd)
+ attachdir=$(mktemp -d)
+ cd $attachdir
+ trap 'rm -r "$attachdir"' EXIT
+
+ mseq -r "$@" \
+ | xargs -I {} mshow -Bx {} \
+ | xargs --null realpath \
+ | sed '/^$/d; s/^/Attach: /'
+ cd $prev
+ fi
+
printf '\n\n'
if [ -z "$raw" ]; then
mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'
From 8effd1244ef13739d986ac06c1806076d8d6a33b Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Fri, 24 Nov 2023 13:54:04 +0100
Subject: [PATCH 2/2] Don't ask for confirmation when deleting draft
---
mcom | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mcom b/mcom
index e62b759..e52fb9a 100755
--- a/mcom
+++ b/mcom
@@ -544,7 +544,7 @@ while :; do
c=send
;;
d|delete)
- rm -i "$draft"
+ rm "$draft"
if ! [ -f "$draft" ]; then
rm -f "$draftmime"
printf '%s\n' "mcom: deleted draft $draft"
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Updated] Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
` (4 preceding siblings ...)
2023-11-24 12:55 ` rakoo
@ 2024-04-24 16:51 ` rakoo
2024-04-24 16:54 ` rakoo
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2024-04-24 16:51 UTC (permalink / raw)
To: ml
[-- 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: 2936 bytes --]
From 216be7d5f2f2ec120adb3f9aa4728b01eb48f0fe Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Sat, 11 Nov 2023 02:01:19 +0100
Subject: [PATCH 1/4] Attach all files when forwarding in raw mode
---
mcom | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/mcom b/mcom
index 4e834c6..e62b759 100755
--- a/mcom
+++ b/mcom
@@ -306,6 +306,19 @@ fi
msgid
museragent
cat "$MBLAZE/headers" 2>/dev/null
+ if [ -n "$raw" ]; then
+ prev=$(pwd)
+ attachdir=$(mktemp -d)
+ cd $attachdir
+ trap 'rm -r "$attachdir"' EXIT
+
+ mseq -r "$@" \
+ | xargs -I {} mshow -Bx {} \
+ | xargs --null realpath \
+ | sed '/^$/d; s/^/Attach: /'
+ cd $prev
+ fi
+
printf '\n\n'
if [ -z "$raw" ]; then
mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'
From 8effd1244ef13739d986ac06c1806076d8d6a33b Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Fri, 24 Nov 2023 13:54:04 +0100
Subject: [PATCH 2/4] Don't ask for confirmation when deleting draft
---
mcom | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mcom b/mcom
index e62b759..e52fb9a 100755
--- a/mcom
+++ b/mcom
@@ -544,7 +544,7 @@ while :; do
c=send
;;
d|delete)
- rm -i "$draft"
+ rm "$draft"
if ! [ -f "$draft" ]; then
rm -f "$draftmime"
printf '%s\n' "mcom: deleted draft $draft"
From a9154b04c7969c36b3479d410b61ec7dfa47999f Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Fri, 9 Feb 2024 13:43:36 +0100
Subject: [PATCH 3/4] Fix attachment handling for multiple files
---
mcom | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mcom b/mcom
index e52fb9a..4e849aa 100755
--- a/mcom
+++ b/mcom
@@ -314,7 +314,7 @@ fi
mseq -r "$@" \
| xargs -I {} mshow -Bx {} \
- | xargs --null realpath \
+ | xargs realpath \
| sed '/^$/d; s/^/Attach: /'
cd $prev
fi
From 185bbf96e4a7fd2a1bdde380dad90913c47fa2ec Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Wed, 24 Apr 2024 18:47:46 +0200
Subject: [PATCH 4/4] 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] 11+ messages in thread
* Re: [PR PATCH] [Updated] Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
` (5 preceding siblings ...)
2024-04-24 16:51 ` rakoo
@ 2024-04-24 16:54 ` rakoo
2024-04-24 16:58 ` rakoo
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2024-04-24 16:54 UTC (permalink / raw)
To: ml
[-- 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: 2936 bytes --]
From a7e4ad11210f674d83987955394ad78d70ac9a69 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Sat, 11 Nov 2023 02:01:19 +0100
Subject: [PATCH 1/4] Attach all files when forwarding in raw mode
---
mcom | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/mcom b/mcom
index 4e834c6..e62b759 100755
--- a/mcom
+++ b/mcom
@@ -306,6 +306,19 @@ fi
msgid
museragent
cat "$MBLAZE/headers" 2>/dev/null
+ if [ -n "$raw" ]; then
+ prev=$(pwd)
+ attachdir=$(mktemp -d)
+ cd $attachdir
+ trap 'rm -r "$attachdir"' EXIT
+
+ mseq -r "$@" \
+ | xargs -I {} mshow -Bx {} \
+ | xargs --null realpath \
+ | sed '/^$/d; s/^/Attach: /'
+ cd $prev
+ fi
+
printf '\n\n'
if [ -z "$raw" ]; then
mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'
From d39a6a3f9216c2ec19b90c6c69bc4c2bf88db707 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Fri, 24 Nov 2023 13:54:04 +0100
Subject: [PATCH 2/4] Don't ask for confirmation when deleting draft
---
mcom | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mcom b/mcom
index e62b759..e52fb9a 100755
--- a/mcom
+++ b/mcom
@@ -544,7 +544,7 @@ while :; do
c=send
;;
d|delete)
- rm -i "$draft"
+ rm "$draft"
if ! [ -f "$draft" ]; then
rm -f "$draftmime"
printf '%s\n' "mcom: deleted draft $draft"
From 12aed8d5f5bd8482f80ab3c7a800106601a5da03 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Fri, 9 Feb 2024 13:43:36 +0100
Subject: [PATCH 3/4] Fix attachment handling for multiple files
---
mcom | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mcom b/mcom
index e52fb9a..4e849aa 100755
--- a/mcom
+++ b/mcom
@@ -314,7 +314,7 @@ fi
mseq -r "$@" \
| xargs -I {} mshow -Bx {} \
- | xargs --null realpath \
+ | xargs realpath \
| sed '/^$/d; s/^/Attach: /'
cd $prev
fi
From 74a7957a6df0eefe4f2cb9eaf49aa75679fb04f1 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Wed, 24 Apr 2024 18:47:46 +0200
Subject: [PATCH 4/4] 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] 11+ messages in thread
* Re: [PR PATCH] [Updated] Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
` (6 preceding siblings ...)
2024-04-24 16:54 ` rakoo
@ 2024-04-24 16:58 ` rakoo
2024-04-24 17:02 ` [PR PATCH] [Closed]: " rakoo
2024-04-24 17:02 ` rakoo
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2024-04-24 16:58 UTC (permalink / raw)
To: ml
[-- 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"
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Closed]: Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
` (7 preceding siblings ...)
2024-04-24 16:58 ` rakoo
@ 2024-04-24 17:02 ` rakoo
2024-04-24 17:02 ` rakoo
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2024-04-24 17:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 485 bytes --]
There's a closed pull request on the mblaze repository
Improve attachments handling
https://github.com/leahneukirchen/mblaze/pull/234
Description:
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...
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Improve attachments handling
2023-02-27 14:39 [PR PATCH] Improve attachments handling rakoo
` (8 preceding siblings ...)
2024-04-24 17:02 ` [PR PATCH] [Closed]: " rakoo
@ 2024-04-24 17:02 ` rakoo
9 siblings, 0 replies; 11+ messages in thread
From: rakoo @ 2024-04-24 17:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
New comment by rakoo on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/234#issuecomment-2075430362
Comment:
Closing to reopen on a proper branch
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-04-24 17:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 14:39 [PR PATCH] Improve attachments handling 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
2024-04-24 17:02 ` [PR PATCH] [Closed]: " rakoo
2024-04-24 17:02 ` 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).