From: Ævar Arnfjörð Bjarmason Date: Thu, 23 Aug 2018 18:02:33 GMT Subject: Re: [PATCH v2 01/10] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells Message-ID: <871sapezba.fsf@evledraar.gmail.com> In-Reply-To: <20180711064642.6933-2-sunshine@sunshineco.com> On Wed, Jul 11 2018, Eric Sunshine wrote: Found in some 2.19 testing on AIX: > +# here-doc -- swallow it to avoid false hits within its body (but keep the > +# command to which it was attached) > +/<<[ ]*[-\\]*EOF[ ]*/ { > + s/[ ]*<<[ ]*[-\\]*EOF// > + h > + :hereslurp > + N > + s/.*\n// > + /^[ ]*EOF[ ]*$/!bhereslurp > + x > +} AIX sed doesn't like this, and will yell: :hereslurp is greater than eight characters This on top fixes it: diff --git a/t/chainlint.sed b/t/chainlint.sed index 8544df38df..2333705b27 100644 --- a/t/chainlint.sed +++ b/t/chainlint.sed @@ -100 +100 @@ - :hereslurp + :hered @@ -104 +104 @@ - bhereslurp + bhered @@ -286 +286 @@ s/[ ]*< +:subshell > +# bare "(" line? > +/^[ ]*([ ]*$/ { > + # stash for later printing > + h > + bnextline > +} > +# "(..." line -- split off and stash "(", then process "..." as its own line AIX sed doesn't like this either, and prints: sed: # stash for later printing is not a recognized function. I have no idea what the fix is for that one.