Fossil SCM

Improved the documentation for quote parsing in globs.

wyoung 2023-05-22 23:54 trunk
Commit 609bf98b0646c43819fe566b1b7d83d2012fc2cce33e737a33bcacc1f1aa14e3
1 file changed +14 -4
+14 -4
--- www/globs.md
+++ www/globs.md
@@ -34,13 +34,23 @@
3434
3535
3636
## <a id="syntax"></a>Syntax
3737
3838
Where Fossil accepts glob patterns, it will usually accept a *list* of
39
-individual patterns separated from the others
40
-by whitespace or commas. Whitespace and
41
-commas may be quoted with either single or double quotation marks.
39
+individual patterns separated from the others by whitespace or commas.
40
+
41
+The parser allows whitespace and commas in a pattern by quoting _the
42
+entire pattern_ with either single or double quotation marks. Internal
43
+quotation marks are treated literally. Moreover, a pattern that begins
44
+with a quote mark ends when the first instance of the same mark occurs,
45
+_not_ at a whitespace or comma. Thus, this:
46
+
47
+ "foo bar"qux
48
+
49
+…constitutes _two_ patterns rather than one with an embedded space, in
50
+contravention of normal shell quoting rules.
51
+
4252
A list matches a file when any pattern in that list matches.
4353
4454
A pattern must consume and
4555
match the *entire* file name to succeed. Partial matches are failed matches.
4656
@@ -276,11 +286,11 @@
276286
277287
## Platform Quirks
278288
279289
Fossil glob patterns are based on the glob pattern feature of POSIX
280290
shells. Fossil glob patterns also have a quoting mechanism, discussed
281
-above. Because other parts of your operating system may interpret glob
291
+[above](#syntax). Because other parts of your operating system may interpret glob
282292
patterns and quotes separately from Fossil, it is often difficult to
283293
give glob patterns correctly to Fossil on the command line. Quotes and
284294
special characters in glob patterns are likely to be interpreted when
285295
given as part of a `fossil` command, causing unexpected behavior.
286296
287297
--- www/globs.md
+++ www/globs.md
@@ -34,13 +34,23 @@
34
35
36 ## <a id="syntax"></a>Syntax
37
38 Where Fossil accepts glob patterns, it will usually accept a *list* of
39 individual patterns separated from the others
40 by whitespace or commas. Whitespace and
41 commas may be quoted with either single or double quotation marks.
 
 
 
 
 
 
 
 
 
 
42 A list matches a file when any pattern in that list matches.
43
44 A pattern must consume and
45 match the *entire* file name to succeed. Partial matches are failed matches.
46
@@ -276,11 +286,11 @@
276
277 ## Platform Quirks
278
279 Fossil glob patterns are based on the glob pattern feature of POSIX
280 shells. Fossil glob patterns also have a quoting mechanism, discussed
281 above. Because other parts of your operating system may interpret glob
282 patterns and quotes separately from Fossil, it is often difficult to
283 give glob patterns correctly to Fossil on the command line. Quotes and
284 special characters in glob patterns are likely to be interpreted when
285 given as part of a `fossil` command, causing unexpected behavior.
286
287
--- www/globs.md
+++ www/globs.md
@@ -34,13 +34,23 @@
34
35
36 ## <a id="syntax"></a>Syntax
37
38 Where Fossil accepts glob patterns, it will usually accept a *list* of
39 individual patterns separated from the others by whitespace or commas.
40
41 The parser allows whitespace and commas in a pattern by quoting _the
42 entire pattern_ with either single or double quotation marks. Internal
43 quotation marks are treated literally. Moreover, a pattern that begins
44 with a quote mark ends when the first instance of the same mark occurs,
45 _not_ at a whitespace or comma. Thus, this:
46
47 "foo bar"qux
48
49 …constitutes _two_ patterns rather than one with an embedded space, in
50 contravention of normal shell quoting rules.
51
52 A list matches a file when any pattern in that list matches.
53
54 A pattern must consume and
55 match the *entire* file name to succeed. Partial matches are failed matches.
56
@@ -276,11 +286,11 @@
286
287 ## Platform Quirks
288
289 Fossil glob patterns are based on the glob pattern feature of POSIX
290 shells. Fossil glob patterns also have a quoting mechanism, discussed
291 [above](#syntax). Because other parts of your operating system may interpret glob
292 patterns and quotes separately from Fossil, it is often difficult to
293 give glob patterns correctly to Fossil on the command line. Quotes and
294 special characters in glob patterns are likely to be interpreted when
295 given as part of a `fossil` command, causing unexpected behavior.
296
297

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button