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


Groups > gnu.bash.bug > #15799

Re: Filename Expansion bug

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Robert Elz <kre@munnari.OZ.AU>
Newsgroups gnu.bash.bug
Subject Re: Filename Expansion bug
Date Sat, 11 Jan 2020 08:39:45 +0700
Lines 25
Approved bug-bash@gnu.org
Message-ID <mailman.2381.1578706864.1979.bug-bash@gnu.org> (permalink)
References <CAJV=ESHn1G2+9FSdtpTPT+CtqahNMiWJtRTE71PagS=H+2VA8A@mail.gmail.com> <CAJV=ESGhY7Wu==vMeUS+icoLBYkONBxuUpTdoUsm3fv=EZFiEQ@mail.gmail.com> <66b2510f-a2cf-b4d3-4574-9193a9bc89c4@case.edu> <16319.1578706785@jinx.noi.kre.to>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace usenet.stanford.edu 1578706865 1140 209.51.188.17 (11 Jan 2020 01:41:05 GMT)
X-Complaints-To action@cs.stanford.edu
Cc chet.ramey@case.edu, bug-bash@gnu.org
To Mickael KENIKSSI <k.mickael@gmail.com>
Envelope-to bug-bash@gnu.org
In-Reply-To <CAJV=ESHn1G2+9FSdtpTPT+CtqahNMiWJtRTE71PagS=H+2VA8A@mail.gmail.com>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 3.x [generic]
X-Received-From 2001:3c8:9009:181::2
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <16319.1578706785@jinx.noi.kre.to>
X-Mailman-Original-References <CAJV=ESHn1G2+9FSdtpTPT+CtqahNMiWJtRTE71PagS=H+2VA8A@mail.gmail.com> <CAJV=ESGhY7Wu==vMeUS+icoLBYkONBxuUpTdoUsm3fv=EZFiEQ@mail.gmail.com> <66b2510f-a2cf-b4d3-4574-9193a9bc89c4@case.edu>
Xref csiph.com gnu.bash.bug:15799

Show key headers only | View raw


    Date:        Thu, 9 Jan 2020 12:09:22 +0100
    From:        Mickael KENIKSSI <k.mickael@gmail.com>
    Message-ID:  <CAJV=ESHn1G2+9FSdtpTPT+CtqahNMiWJtRTE71PagS=H+2VA8A@mail.gmail.com>

  | zsh (and ksh) provide the expected result:

As far as I can tell, all shells except bash preserve the
null components, regardless of whether or not pattern chars
appear in filenames to the right or left of the last/first '/'.

I don't think it is a good idea to rely on any specific
behaviour here though - about the only string it makes
sense to compare the results of a pathname expansion with is
the initial pattern (considered as a string) and even there
extreme care is required (particularly if you don't control
the pattern).

That said, I also see no particularly good reason why bash should
be the outlier here.

kre


Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Filename Expansion bug Robert Elz <kre@munnari.OZ.AU> - 2020-01-11 08:39 +0700

csiph-web