leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
419 stars 48 forks source link

Fix typo in reading body from arg #260

Closed rakoo closed 4 weeks ago

rakoo commented 1 month ago

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.

leahneukirchen commented 4 weeks ago

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

rakoo commented 4 weeks ago

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