Fossil SCM

Expanded a few of the sections in the new www/grep.md doc

wyoung 2018-10-03 20:20 trunk
Commit f984d331aee7f63c99dc4e5b7b66d253f7daac9ced28f62f8401529eeed4a3f0
1 file changed +21 -15
+21 -15
--- www/grep.md
+++ www/grep.md
@@ -1,8 +1,8 @@
1
-# Fossil's Internal 'grep' Command
1
+# Fossil grep vs POSIX grep
22
3
-As of Fossil 2.7, there is a `grep` command which acts something like
3
+As of Fossil 2.7, there is a `grep` command which acts roughly like
44
POSIX's `grep -E` over all historical versions of a single file name.
55
This document explains the commonalities and divergences between POSIX
66
`grep` and Fossil `grep`.
77
88
@@ -15,12 +15,19 @@
1515
|--------|-------------------------------------------------------------
1616
| `-i` | ignore case in matches
1717
| `-l` | list a checkin ID prefix for matching historical versions of the file
1818
| `-v` | print each checkin ID considered, regardless of whether it matches
1919
20
-No equivalent of other POSIX `grep` options currently exist. Patches to
21
-remove those limitations will be thoughtfully considered.
20
+No equivalent of other POSIX `grep` options currently exist.
21
+
22
+Note in partcicular that there is no equivalent of `grep -R`, either
23
+implicitly or explicitly. Fossil `grep` currently accepts only a single
24
+input file name. You cannot give it a list of file names, and you cannot
25
+give it a a directory name for Fossil to expand to the set of all files
26
+under that directory.
27
+
28
+Patches to remove those limitations will be thoughtfully considered.
2229
2330
2431
## Regular Expression Dialect
2532
2633
Fossil contains a built-in regular expression engine implementing a
@@ -59,21 +66,20 @@
5966
POSIX compatible regular expression engine. Among them are:
6067
6168
* There is currently no support for POSIX character classes such as
6269
`[:lower:]`.
6370
64
-* Fossil does not currently attempt to take your operating system's
65
- locale settings into account when doing this match. Fossil also
66
- currently has no way to mark a given file as having a particular
67
- encoding.
68
-
69
- Instead, Fossil `grep` assumes the input files are in UTF-8 format,
70
- so it will not work correctly if the files in your repository are in
71
- an encoding that is not backwards-compatible with ASCII, such as
72
- UTF-16. Partially compatible encodings such as ISO 8859 should work
73
- with Fossil `grep` as long as you stick to their ASCII-compatible
74
- subset.
71
+* Fossil `grep` does not currently attempt to take your operating
72
+ system's locale settings into account when doing this match. Since
73
+ Fossil has no way to mark a given file as having a particular
74
+ encoding, Fossil `grep` assumes the input files are in UTF-8 format.
75
+
76
+ This means Fossil `grep` will not work correctly if the files in
77
+ your repository are in an encoding that is not backwards-compatible
78
+ with ASCII, such as UTF-16. Partially compatible encodings such as
79
+ ISO 8859 should work with Fossil `grep` as long as you stick to
80
+ their ASCII-compatible subset.
7581
7682
The Fossil `grep` language is not a strict subset of POSIX extended
7783
regular expressions. Some of the features documented above are
7884
well-understood extensions to it, such as the "word" features `\b`, `\w`
7985
and `\W`.
8086
--- www/grep.md
+++ www/grep.md
@@ -1,8 +1,8 @@
1 # Fossil's Internal 'grep' Command
2
3 As of Fossil 2.7, there is a `grep` command which acts something like
4 POSIX's `grep -E` over all historical versions of a single file name.
5 This document explains the commonalities and divergences between POSIX
6 `grep` and Fossil `grep`.
7
8
@@ -15,12 +15,19 @@
15 |--------|-------------------------------------------------------------
16 | `-i` | ignore case in matches
17 | `-l` | list a checkin ID prefix for matching historical versions of the file
18 | `-v` | print each checkin ID considered, regardless of whether it matches
19
20 No equivalent of other POSIX `grep` options currently exist. Patches to
21 remove those limitations will be thoughtfully considered.
 
 
 
 
 
 
 
22
23
24 ## Regular Expression Dialect
25
26 Fossil contains a built-in regular expression engine implementing a
@@ -59,21 +66,20 @@
59 POSIX compatible regular expression engine. Among them are:
60
61 * There is currently no support for POSIX character classes such as
62 `[:lower:]`.
63
64 * Fossil does not currently attempt to take your operating system's
65 locale settings into account when doing this match. Fossil also
66 currently has no way to mark a given file as having a particular
67 encoding.
68
69 Instead, Fossil `grep` assumes the input files are in UTF-8 format,
70 so it will not work correctly if the files in your repository are in
71 an encoding that is not backwards-compatible with ASCII, such as
72 UTF-16. Partially compatible encodings such as ISO 8859 should work
73 with Fossil `grep` as long as you stick to their ASCII-compatible
74 subset.
75
76 The Fossil `grep` language is not a strict subset of POSIX extended
77 regular expressions. Some of the features documented above are
78 well-understood extensions to it, such as the "word" features `\b`, `\w`
79 and `\W`.
80
--- www/grep.md
+++ www/grep.md
@@ -1,8 +1,8 @@
1 # Fossil grep vs POSIX grep
2
3 As of Fossil 2.7, there is a `grep` command which acts roughly like
4 POSIX's `grep -E` over all historical versions of a single file name.
5 This document explains the commonalities and divergences between POSIX
6 `grep` and Fossil `grep`.
7
8
@@ -15,12 +15,19 @@
15 |--------|-------------------------------------------------------------
16 | `-i` | ignore case in matches
17 | `-l` | list a checkin ID prefix for matching historical versions of the file
18 | `-v` | print each checkin ID considered, regardless of whether it matches
19
20 No equivalent of other POSIX `grep` options currently exist.
21
22 Note in partcicular that there is no equivalent of `grep -R`, either
23 implicitly or explicitly. Fossil `grep` currently accepts only a single
24 input file name. You cannot give it a list of file names, and you cannot
25 give it a a directory name for Fossil to expand to the set of all files
26 under that directory.
27
28 Patches to remove those limitations will be thoughtfully considered.
29
30
31 ## Regular Expression Dialect
32
33 Fossil contains a built-in regular expression engine implementing a
@@ -59,21 +66,20 @@
66 POSIX compatible regular expression engine. Among them are:
67
68 * There is currently no support for POSIX character classes such as
69 `[:lower:]`.
70
71 * Fossil `grep` does not currently attempt to take your operating
72 system's locale settings into account when doing this match. Since
73 Fossil has no way to mark a given file as having a particular
74 encoding, Fossil `grep` assumes the input files are in UTF-8 format.
75
76 This means Fossil `grep` will not work correctly if the files in
77 your repository are in an encoding that is not backwards-compatible
78 with ASCII, such as UTF-16. Partially compatible encodings such as
79 ISO 8859 should work with Fossil `grep` as long as you stick to
80 their ASCII-compatible subset.
 
81
82 The Fossil `grep` language is not a strict subset of POSIX extended
83 regular expressions. Some of the features documented above are
84 well-understood extensions to it, such as the "word" features `\b`, `\w`
85 and `\W`.
86

Keyboard Shortcuts

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