Skip to content

Globbing engine syntax documentation example possible error #79

@mazeTemporal

Description

@mazeTemporal

On page:
https://wyam.io/docs/concepts/io
I have two issues.

First issue:
I was looking at the examples for Globbing Engine Syntax and noticed something that is either an error or an unintuitive definition:

Leaving the last option blank indicates any match at that position. For example, /{a,}/**/x.txt will find:
/a/x.txt
/a/b/x.txt
/d/x.txt

I would expect that the pattern /{a,}/**/x.txt would require matched files to be at least two directories deep since / is the root, {a,}/ is one deep and then **/ is another one or more.

Second issue:
I would appreciate some extra clarification about the syntax.

  1. It says that * and ** match any number of characters, does that mean 0 or more such that /*.txt would match "/.txt"?
  2. Is {n,x} an or statement that will match either "n" or "x" or is this a range that will match anything from "n" to "x", such as "t"?
  3. If {n,x} is an or statement then can it be even longer, such as {n,x,y} to match three characters?
  4. When you leave one side null, for example {c,}, does it match everything that is "c" or greater meaning that it would match "c" and "t", but not "a" or "b"?
  5. If 4 is true, where do numbers and symbols show up in the ordering, is it by ascii order?
  6. If 4 and 5 are true, is it possible to have the first entry null, such as {,b} to match all characters less than or equal to "b"?
  7. It says that ! is useful when used with multiple expansion such as {*,!x}. Is it usable in any other way and what would it mean in that context?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions