Github messages for mblaze
 help / color / mirror / Atom feed
* [PR PATCH] Fix typo in reading body from arg
@ 2024-06-17 21:46 rakoo
  2024-06-18 19:01 ` leahneukirchen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rakoo @ 2024-06-17 21:46 UTC (permalink / raw)
  To: ml

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

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

https://github.com/rakoo/mblaze body-arg
https://github.com/leahneukirchen/mblaze/pull/260

Fix typo in reading body from arg
When given a body argument like this:

```
mcom foo@bar -body "this is my body"
```

the body isn't taken into account. This is because we try to `cat` from a file called "this is my body", instead of doing a process substitution for a file that fake-contains "this is my body". I believe it is a typo.

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

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

From 98f76924d81b025596e881cfe5b87fd5c1b6bd45 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Mon, 17 Jun 2024 23:42:16 +0200
Subject: [PATCH] mcom: fix reading from body given in arg

---
 mcom | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mcom b/mcom
index 4e834c6..28f1ddf 100755
--- a/mcom
+++ b/mcom
@@ -287,7 +287,7 @@ fi
 		printf '\n'
 		(
 			IFS=$NL
-			cat -- /dev/null $(printf '%s' "$hdrs" | mhdr -M -h body -)
+			cat -- /dev/null <(printf '%s' "$hdrs" | mhdr -M -h body -)
 		)
 		printf '\n'
 		;;

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

* Re: [PR PATCH] [Closed]: Fix typo in reading body from arg
  2024-06-17 21:46 [PR PATCH] Fix typo in reading body from arg rakoo
  2024-06-18 19:01 ` leahneukirchen
@ 2024-06-18 19:01 ` leahneukirchen
  2024-06-18 19:51 ` rakoo
  2 siblings, 0 replies; 4+ messages in thread
From: leahneukirchen @ 2024-06-18 19:01 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the mblaze repository

Fix typo in reading body from arg
https://github.com/leahneukirchen/mblaze/pull/260

Description:
When given a body argument like this:

```
mcom foo@bar -body "this is my body"
```

the body isn't taken into account. This is because we try to `cat` from a file called "this is my body", instead of doing a process substitution for a file that fake-contains "this is my body". I believe it is a typo.

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

* Re: Fix typo in reading body from arg
  2024-06-17 21:46 [PR PATCH] Fix typo in reading body from arg rakoo
@ 2024-06-18 19:01 ` leahneukirchen
  2024-06-18 19:01 ` [PR PATCH] [Closed]: " leahneukirchen
  2024-06-18 19:51 ` rakoo
  2 siblings, 0 replies; 4+ messages in thread
From: leahneukirchen @ 2024-06-18 19:01 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/pull/260#issuecomment-2176767138

Comment:
No, see the documentation:

```
The flag -body file can be used to
     prepopulate the draft for mcom and mrep with the contents of file.

```

You can use a here-string if you want to pass a string as a body (if your shell supports it).

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

* Re: Fix typo in reading body from arg
  2024-06-17 21:46 [PR PATCH] Fix typo in reading body from arg rakoo
  2024-06-18 19:01 ` leahneukirchen
  2024-06-18 19:01 ` [PR PATCH] [Closed]: " leahneukirchen
@ 2024-06-18 19:51 ` rakoo
  2 siblings, 0 replies; 4+ messages in thread
From: rakoo @ 2024-06-18 19:51 UTC (permalink / raw)
  To: ml

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

New comment by rakoo on mblaze repository

https://github.com/leahneukirchen/mblaze/pull/260#issuecomment-2176846247

Comment:
Oh ok, so the argument to `mcom` should be a file, not a string

The problem I have is probably in `mmailto` then, which passes the content of the `body` arg as a string. I'll do the necessary changes over there

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

end of thread, other threads:[~2024-06-18 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17 21:46 [PR PATCH] Fix typo in reading body from arg rakoo
2024-06-18 19:01 ` leahneukirchen
2024-06-18 19:01 ` [PR PATCH] [Closed]: " leahneukirchen
2024-06-18 19:51 ` 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).