dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@ethup.se>
To: dash@vger.kernel.org
Subject: Parameter expansion, patterns and fnmatch
Date: Tue, 9 Aug 2016 11:28:32 +0200	[thread overview]
Message-ID: <20160809092832.GB23983@brutus.ethup.se> (raw)


I'm seeing some discrepancies between dash built with --enable-fnmatch
and dash built without that got me curious. Maybe you could help shed
some light?

 echo ${foo#[}
 echo ${foo#\[}

With dash built with --enable-fnmatch:


With dash built without --enable-fnmatch:


I was able to reproduce this behavior on latest git master
(17a5f24e0). The dash manual states:

> The end of the character class is indicated by a ]; if the ] is
> missing then the [ matches a [ rather than introducing a character
> class.

Which to me suggests that the non-fnmatch case is not the expected
behavior. Is this interpretation correct?

Olof Johansson                            https://github.com/olof

             reply	other threads:[~2016-08-09  9:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09  9:28 Olof Johansson [this message]
2016-08-09 21:39 ` Parameter expansion, patterns and fnmatch Harald van Dijk
2016-08-17 14:50   ` Olof Johansson
2016-09-02 14:04   ` Herbert Xu
2016-09-02 14:25     ` Eric Blake
2016-09-02 14:29       ` Herbert Xu
2016-09-02 14:49         ` Eric Blake
2016-09-02 14:51           ` Herbert Xu
2016-09-03 12:03             ` Harald van Dijk
2016-09-03 13:05               ` Herbert Xu
2016-09-03 13:19                 ` Harald van Dijk
2016-09-03 13:58                   ` Herbert Xu
2016-09-03 15:16                     ` Harald van Dijk
2016-09-02 14:46       ` Herbert Xu
2016-09-02 14:54         ` Eric Blake
2016-09-02 15:06         ` Chet Ramey
2016-09-02 14:48       ` Eric Blake
2016-09-02 15:12     ` Jilles Tjoelker

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:

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

  git send-email \
    --in-reply-to=20160809092832.GB23983@brutus.ethup.se \
    --to=olof@ethup.se \
    --cc=dash@vger.kernel.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).