Fossil SCM
Improved the documentation for quote parsing in globs.
Commit
609bf98b0646c43819fe566b1b7d83d2012fc2cce33e737a33bcacc1f1aa14e3
Parent
c5d287b66b1c353…
1 file changed
+14
-4
+14
-4
| --- www/globs.md | ||
| +++ www/globs.md | ||
| @@ -34,13 +34,23 @@ | ||
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | ## <a id="syntax"></a>Syntax |
| 37 | 37 | |
| 38 | 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. | |
| 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 | + | |
| 42 | 52 | A list matches a file when any pattern in that list matches. |
| 43 | 53 | |
| 44 | 54 | A pattern must consume and |
| 45 | 55 | match the *entire* file name to succeed. Partial matches are failed matches. |
| 46 | 56 | |
| @@ -276,11 +286,11 @@ | ||
| 276 | 286 | |
| 277 | 287 | ## Platform Quirks |
| 278 | 288 | |
| 279 | 289 | Fossil glob patterns are based on the glob pattern feature of POSIX |
| 280 | 290 | 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 | |
| 282 | 292 | patterns and quotes separately from Fossil, it is often difficult to |
| 283 | 293 | give glob patterns correctly to Fossil on the command line. Quotes and |
| 284 | 294 | special characters in glob patterns are likely to be interpreted when |
| 285 | 295 | given as part of a `fossil` command, causing unexpected behavior. |
| 286 | 296 | |
| 287 | 297 |
| --- 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 |