[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filename Expansion bug

From: Robert Elz
Subject: Re: Filename Expansion bug
Date: Sat, 11 Jan 2020 08:39:45 +0700

    Date:        Thu, 9 Jan 2020 12:09:22 +0100
    From:        Mickael KENIKSSI <address@hidden>
    Message-ID:  <CAJV=ESHn1G2+9FSdtpTPT+CtqahNMiWJtRTE71PagS=address@hidden>

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]