Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Listed the actual differences between fossil grep options and those defined by POSIX in www/grep.md. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d5499091eed2757ccf8e93e502236517 |
User & Date: | wyoung 2018-10-03 21:25:19.876 |
Context
2018-10-03
| ||
21:51 | Added -DUSE_LINENOISE to Makefile.classic, since it's built into Fossil, and that build system has no way to find or use libedit or libreadline intead. ... (check-in: 15e1dcd0 user: wyoung tags: trunk) | |
21:25 | Listed the actual differences between fossil grep options and those defined by POSIX in www/grep.md. ... (check-in: d5499091 user: wyoung tags: trunk) | |
21:11 | Added a spec reference to POSIX grep, and fixed a typo. ... (check-in: 9fc411ab user: wyoung tags: trunk) | |
Changes
Changes to www/grep.md.
︙ | ︙ | |||
14 15 16 17 18 19 20 | | Option | Meaning |--------|------------------------------------------------------------- | `-i` | ignore case in matches | `-l` | list a checkin ID prefix for matching historical versions of the file | `-v` | print each checkin ID considered, regardless of whether it matches | > | > > > > > | > | > > > > > > > > > > > > > | | > > > > | > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 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 59 | | Option | Meaning |--------|------------------------------------------------------------- | `-i` | ignore case in matches | `-l` | list a checkin ID prefix for matching historical versions of the file | `-v` | print each checkin ID considered, regardless of whether it matches That leaves many divergences at the option level from POSIX `grep`: * There is no built-in way to get a count of matches, as with `grep -c`. * You cannot give more than one pattern, as with `grep -e` or `grep -f`. * There is no equivalent of `grep -F` to do literal fixed-string matches only. * `fossil grep -l` does not do precisely the same thing as POSIX `grep -l`: it lists checkin ID prefixes, not file names. * Fossil always gives the line number in its output, which is to say that it acts like `grep -n`. There is no way to disable the line number in `fossil grep` output. * There is no way to suppress all output, returning only a status code to indicate whether the pattern matched, as with `grep -q`. * There is no way to suppress error output, as with `grep -s`. * Fossil `grep` accepts only a single input file name. You cannot give it a list of file names, and you cannot give it a directory name for Fossil to expand to the set of all files under that directory. This means Fossil `grep` has no equivalent of the common POSIX `grep -R` extension. (And if it did, it would probably have a different option letter, since `-R` in Fossil has a different meaning, by convention.) * You cannot invert the match, as with `grep -v`. Patches to remove those limitations will be thoughtfully considered. ## Regular Expression Dialect Fossil contains a built-in regular expression engine implementing a |
︙ | ︙ |