Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14380 > unrolled thread

Re: Empty ""s in ARG in ${x:+ARG} expand to no words instead of the empty word if prepended/appended with space

Started byRobert Elz <kre@munnari.OZ.AU>
First post2018-07-22 00:45 +0700
Last post2018-07-22 00:45 +0700
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Empty ""s in ARG in ${x:+ARG} expand to no words instead of the empty word if prepended/appended with space Robert Elz <kre@munnari.OZ.AU> - 2018-07-22 00:45 +0700

#14380 — Re: Empty ""s in ARG in ${x:+ARG} expand to no words instead of the empty word if prepended/appended with space

FromRobert Elz <kre@munnari.OZ.AU>
Date2018-07-22 00:45 +0700
SubjectRe: Empty ""s in ARG in ${x:+ARG} expand to no words instead of the empty word if prepended/appended with space
Message-ID<mailman.3989.1532195197.1292.bug-bash@gnu.org>
    Date:        Sat, 21 Jul 2018 11:33:18 -0400
    From:        Chet Ramey <chet.ramey@case.edu>
    Message-ID:  <2fe93203-93fd-2a97-ff54-7cb748294640@case.edu>

  | Even if the whitespace gets stripped out, the quoted null string should
  | result in an empty argument.

Yes, it certainly should (and unless IFS has been set "oddly"
the white space will be removed, but that's irrelevant).

For what it is worth, as recently as 4.2.0 (and maybe more recently)
bash got this right, so it is something that has changed in 4.3 or 4.4
(or maybe later in 4.2).

kre

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web