dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Nikolai Merinov <n.merinov@inango-systems.com>
Cc: dash@vger.kernel.org, os@inango-systems.com
Subject: Re: [PATCH] expand: Fix trailing newlines processing in backquote expanding
Date: Mon, 20 Jan 2020 17:56:20 +0800	[thread overview]
Message-ID: <20200120095620.aejcnfr74q7cbn37@gondor.apana.org.au> (raw)
In-Reply-To: <20190429141337.6804-1-n.merinov@inango-systems.com>

On Mon, Apr 29, 2019 at 07:13:37PM +0500, Nikolai Merinov wrote:
> According to POSIX.1-2008 we should remove newlines only at the end of
> the substitution. Newlines-only substitions causes dash to remove
> newlines before beggining of the substitution. The following code:
> 
>     cat <<END
>     1
>     $(echo "")
>     2
>     END
> 
> prints "1<newline>2" instead of expected "1<newline><newline>2".
> 
> This patch fixes trailing newlines processing in backquote expanding.
> 
> Signed-off-by: Nikolai Merinov <n.merinov@inango-systems.com>
> ---
>  src/expand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      parent reply	other threads:[~2020-01-20  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190429141337.6804-1-n.merinov@inango-systems.com>
2020-01-13 12:08 ` Nikolai Merinov
2020-01-15  6:00   ` Herbert Xu
2020-01-20  9:56 ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200120095620.aejcnfr74q7cbn37@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=dash@vger.kernel.org \
    --cc=n.merinov@inango-systems.com \
    --cc=os@inango-systems.com \
    --subject='Re: [PATCH] expand: Fix trailing newlines processing in backquote expanding' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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