Fossil

Check-in [609bf98b06]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improved the documentation for quote parsing in globs.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 609bf98b0646c43819fe566b1b7d83d2012fc2cce33e737a33bcacc1f1aa14e3
User & Date: wyoung 2023-05-22 23:54:45.289
Context
2023-05-23
02:44
Slight alteration of branch renaming help text to clarify functionality based on discussion in [forum:45cdd8874ce1654a | forum post 45cdd8874ce1654a]. check-in: e053682a4e user: andybradford tags: trunk
2023-05-22
23:54
Improved the documentation for quote parsing in globs. check-in: 609bf98b06 user: wyoung tags: trunk
23:46
Fix to the prior commit: editing lost a closing "*/" in a comment, yet it compiled with only a warning, and I missed the warning. check-in: c5d287b66b user: wyoung tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to www/globs.md.
32
33
34
35
36
37
38
39
40

41









42
43
44
45
46
47
48
have their own glob pattern handling. We will detail such interactions
below.


## <a id="syntax"></a>Syntax

Where Fossil accepts glob patterns, it will usually accept a *list* of
individual patterns separated from the others
by whitespace or commas. Whitespace and

commas may be quoted with either single or double quotation marks.









A list matches a file when any pattern in that list matches.

A pattern must consume and
match the *entire* file name to succeed. Partial matches are failed matches.

Most characters in a glob pattern consume a single character of the file
name and must match it exactly. For instance, “a” in a glob simply







|
|
>
|
>
>
>
>
>
>
>
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
have their own glob pattern handling. We will detail such interactions
below.


## <a id="syntax"></a>Syntax

Where Fossil accepts glob patterns, it will usually accept a *list* of
individual patterns separated from the others by whitespace or commas.

The parser allows whitespace and commas in a pattern by quoting _the
entire pattern_ with either single or double quotation marks. Internal
quotation marks are treated literally. Moreover, a pattern that begins
with a quote mark ends when the first instance of the same mark occurs,
_not_ at a whitespace or comma. Thus, this:

      "foo bar"qux

…constitutes _two_ patterns rather than one with an embedded space, in
contravention of normal shell quoting rules.

A list matches a file when any pattern in that list matches.

A pattern must consume and
match the *entire* file name to succeed. Partial matches are failed matches.

Most characters in a glob pattern consume a single character of the file
name and must match it exactly. For instance, “a” in a glob simply
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
[`/zip`]:      /help?cmd=/zip


## Platform Quirks

Fossil glob patterns are based on the glob pattern feature of POSIX
shells. Fossil glob patterns also have a quoting mechanism, discussed
above. Because other parts of your operating system may interpret glob
patterns and quotes separately from Fossil, it is often difficult to
give glob patterns correctly to Fossil on the command line. Quotes and
special characters in glob patterns are likely to be interpreted when
given as part of a `fossil` command, causing unexpected behavior.

These problems do not affect [versioned settings files](settings.wiki)
or Admin &rarr; Settings in Fossil UI. Consequently, it is better to







|







284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
[`/zip`]:      /help?cmd=/zip


## Platform Quirks

Fossil glob patterns are based on the glob pattern feature of POSIX
shells. Fossil glob patterns also have a quoting mechanism, discussed
[above](#syntax). Because other parts of your operating system may interpret glob
patterns and quotes separately from Fossil, it is often difficult to
give glob patterns correctly to Fossil on the command line. Quotes and
special characters in glob patterns are likely to be interpreted when
given as part of a `fossil` command, causing unexpected behavior.

These problems do not affect [versioned settings files](settings.wiki)
or Admin &rarr; Settings in Fossil UI. Consequently, it is better to