Github messages for mblaze
 help / color / mirror / Atom feed
* [PR PATCH] mcom: do not match shebang in needs_multipart()
@ 2021-01-04 17:59 codesoap
  2021-01-04 18:04 ` leahneukirchen
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: codesoap @ 2021-01-04 17:59 UTC (permalink / raw)
  To: ml

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

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

https://github.com/codesoap/mblaze shebang
https://github.com/leahneukirchen/mblaze/pull/196

mcom: do not match shebang in needs_multipart()
Avoids matching lines like '#!/usr/bin/env sh'. Also require at least one character after '/'.

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

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

From af81899c0cdb6cee5664ea57bdadd87d93af359c Mon Sep 17 00:00:00 2001
From: codesoap <codesoap@mailbox.org>
Date: Mon, 4 Jan 2021 18:55:48 +0100
Subject: [PATCH] mcom: do not match shebang in needs_multipart()

Avoids matching lines like '#!/usr/bin/env sh'. Also require at least
one character after '/'.
---
 mcom | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mcom b/mcom
index f0de75c..c869fe3 100755
--- a/mcom
+++ b/mcom
@@ -75,7 +75,7 @@ stripempty() {
 
 needs_multipart() {
 	mhdr -h attach "$1" >/dev/null ||
-		grep -q '^#[^ ]*/[^ ]* ' "$1"
+		grep -qE '^#[^! ][^ ]*/[^ ]+ ' "$1"
 }
 
 do_mime() {

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

end of thread, other threads:[~2021-01-04 18:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
2021-01-04 18:04 ` leahneukirchen
2021-01-04 18:05 ` leahneukirchen
2021-01-04 18:14 ` codesoap
2021-01-04 18:15 ` leahneukirchen
2021-01-04 18:16 ` leahneukirchen
2021-01-04 18:16 ` leahneukirchen
2021-01-04 18:19 ` codesoap
2021-01-04 18:21 ` [PR PATCH] [Updated] " codesoap
2021-01-04 18:22 ` codesoap
2021-01-04 18:27 ` [PR PATCH] [Closed]: " leahneukirchen

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