diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2014-07-29 09:03:50 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2014-07-29 09:03:50 +0300 |
commit | 8397a2858f103397d4ae82156b43f7048e788c3b (patch) | |
tree | 834a72cf1ab40701175349000bb5fbbaf06daa59 /doc | |
parent | 2e9dee9f4ac310b688281dd840e5c132f26e108f (diff) | |
download | direvent-8397a2858f103397d4ae82156b43f7048e788c3b.tar.gz direvent-8397a2858f103397d4ae82156b43f7048e788c3b.tar.bz2 |
Introduce pattern negation.
* doc/dircond.conf.5: Document negated patterns.
* doc/dircond.texi: Likewise.
* src/config.c (file_name_pattern): A ! in front of a pattern
indicates negation.
* src/dircond.h (filename_pattern)<neg>: New member.
* src/fnpat.c: Honor neg member.
* tests/envdump.c (main): don't depend on the order of command
line options.
* tests/glob02.at: New test case.
* tests/re05.at: Likewise.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Include new testcases.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/dircond.conf.5 | 5 | ||||
-rw-r--r-- | doc/dircond.texi | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/doc/dircond.conf.5 b/doc/dircond.conf.5 index c257402..199045d 100644 --- a/doc/dircond.conf.5 +++ b/doc/dircond.conf.5 @@ -13,7 +13,7 @@ .\" .\" You should have received a copy of the GNU General Public License along .\" with dircond. If not, see <http://www.gnu.org/licenses/>. -.TH DIRCOND.CONF 5 "December 27, 2013" "DIRCOND" "Dircond User Reference" +.TH DIRCOND.CONF 5 "July 29, 2014" "DIRCOND" "Dircond User Reference" dircond.conf \- configuration file for .BR dircond (8). .SH DESCRIPTION @@ -430,6 +430,9 @@ Use basic regular expressions. .TP .B i Enable case-insensitive matching. + +A pattern or regular expression prefixed with \fB!\fR matches +file names that don't match the pattern without \fB!\fR. .RE .TP \fBevent\fR \fISTRING\-LIST\fR; diff --git a/doc/dircond.texi b/doc/dircond.texi index 760a8a9..4cf0600 100644 --- a/doc/dircond.texi +++ b/doc/dircond.texi @@ -794,8 +794,10 @@ list of globbing patterns (in the sense of @pxref{fnmatch, fnmatch, fnmatch, fnmatch manual,fnmatch(3)}) or extended regular expressions (@pxref{Extended regexps, Extended regular expressions, Extended regular expressions, -sed, GNU sed}) one of which the file name must match in -order for the watcher to act on it. Regular expressions must +sed, GNU sed}) one of which must match the file name in +order for the watcher to act on it. A @samp{!} in front of a pattern +or regular expression indicates negation. Such construct matches +if the file name doesn't match the pattern. Regular expressions must be surrounded by a pair of slashes, optionally followed by the following flags: |