Merge pull request #5951 from remyabel/docs-pf-pp

docs: clarify pp pattern type, fixes #5300
This commit is contained in:
TW 2021-08-07 14:29:28 +02:00 committed by GitHub
commit b65183fc48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -69,12 +69,15 @@ Regular expressions, selector `re:`
the re module <https://docs.python.org/3/library/re.html>`_. the re module <https://docs.python.org/3/library/re.html>`_.
Path prefix, selector `pp:` Path prefix, selector `pp:`
This pattern style is useful to match whole sub-directories. The pattern This pattern style matches either the whole path or an initial segment
`pp:root/somedir` matches `root/somedir` and everything therein. A leading of the path up to but not including a path separator. For consistency
path separator is always removed. with the `fn:` and `sh:` patterns, a path separator is added to the
end of the path before matching. For example, `pp:root/somedir`
matches `root/somedir` and everything therein. A leading path
separator is always removed. A trailing slash makes no difference.
Path full-match, selector `pf:` Path full-match, selector `pf:`
This pattern style is (only) useful to match full paths. This pattern style is (only) useful to match full (exact) paths.
This is kind of a pseudo pattern as it can not have any variable or This is kind of a pseudo pattern as it can not have any variable or
unspecified parts - the full path must be given. `pf:root/file.ext` matches unspecified parts - the full path must be given. `pf:root/file.ext` matches
`root/file.ext` only. A leading path separator is always removed. `root/file.ext` only. A leading path separator is always removed.