Fossil

Check-in [2df14399]
Login

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

Overview
Comment:Correct display of character list examples to work around lack of multi-level bulleted lists
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | glob-docs
Files: files | file ages | folders
SHA3-256:2df14399e6b13bb4bd196a2171fda1af9b6586ca747fd3190cc34f78b5e577b3
User & Date: andygoth 2017-04-20 18:26:42
Original Comment: Correct display of character sequence examples to work around lack of multi-level bulleted lists
Context
2017-04-20
18:53
With examples split into their own list, switch back to compacted bullet lists. check-in: 8ce3e9a6 user: rberteig tags: glob-docs
18:26
Correct display of character list examples to work around lack of multi-level bulleted lists check-in: 2df14399 user: andygoth tags: glob-docs
2017-04-19
22:07
Add some hints about translating from .gitignore to ignore-glob. I only scratched the surface: this could easily become the subject of a book. check-in: ddea92ad user: rberteig tags: glob-docs
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to www/globs.md.

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97



















98
99
100
101
102
103
104

 *  Include `]` in a list by making the first character after the `[` or
    `[^`. At any other place, `]` ends the list. 

 *  Include `^` in a list by placing anywhere except first after the
    `[`.

 *  Some examples of character lists: 
    `[a-d]` Matches any one of `a`, `b`, `c`, or `d` but not `ä`;
    `[^a-d]` Matches exactly one character other than `a`, `b`, `c`,
    or `d`; 
    `[0-9a-fA-F]` Matches exactly one hexadecimal digit;
    `[a-]` Matches either `a` or `-`;
    `[][]` Matches either `]` or `[`;
    `[^]]` Matches exactly one character other than `]`;
    `[]^]` Matches either `]` or `^`; and
    `[^-]` Matches exactly one character other than `-`.

    Beware that ranges in lists may include more than you expect: 
    `[A-z]` Matches `A` and `Z`, but also matches `a` and some less
    obvious characters such as `[`, `\`, and `]` with code point
    values between `Z` and `a`.

    Beware that a range must be specified from low value to high
    value: `[z-a]` does not match any character at all, preventing the
    entire glob from matching.

 *  Note that unlike typical Unix shell globs, wildcards (`*`, `?`,
    and character lists) are allowed to match `/` directory
    separators as well as the initial `.` in the name of a hidden
    file or directory.





















White space means the ASCII characters TAB, LF, VT, FF, CR, and SPACE.
Note that this does not include any of the many additional spacing
characters available in Unicode, and specifically does not include
U+00A0 NO-BREAK SPACE. 

Because both LF and CR are white space and leading and trailing spaces
are stripped from each glob in a list, a list of globs may be broken







<
<
<
<
<
<
<
<
<
<
<
|




|









>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







65
66
67
68
69
70
71











72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

 *  Include `]` in a list by making the first character after the `[` or
    `[^`. At any other place, `]` ends the list. 

 *  Include `^` in a list by placing anywhere except first after the
    `[`.












 *  Beware that ranges in lists may include more than you expect: 
    `[A-z]` Matches `A` and `Z`, but also matches `a` and some less
    obvious characters such as `[`, `\`, and `]` with code point
    values between `Z` and `a`.

 *  Beware that a range must be specified from low value to high
    value: `[z-a]` does not match any character at all, preventing the
    entire glob from matching.

 *  Note that unlike typical Unix shell globs, wildcards (`*`, `?`,
    and character lists) are allowed to match `/` directory
    separators as well as the initial `.` in the name of a hidden
    file or directory.


Some examples of character lists: 

 *  `[a-d]` Matches any one of `a`, `b`, `c`, or `d` but not `ä`;

 *  `[^a-d]` Matches exactly one character other than `a`, `b`, `c`,
    or `d`; 

 *  `[0-9a-fA-F]` Matches exactly one hexadecimal digit;

 *  `[a-]` Matches either `a` or `-`;

 *  `[][]` Matches either `]` or `[`;

 *  `[^]]` Matches exactly one character other than `]`;

 *  `[]^]` Matches either `]` or `^`; and

 *  `[^-]` Matches exactly one character other than `-`.

White space means the ASCII characters TAB, LF, VT, FF, CR, and SPACE.
Note that this does not include any of the many additional spacing
characters available in Unicode, and specifically does not include
U+00A0 NO-BREAK SPACE. 

Because both LF and CR are white space and leading and trailing spaces
are stripped from each glob in a list, a list of globs may be broken