From 1a1e019c3b90089ac3ffa34488ae9bc9382e8924 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Tue, 30 Jan 2024 12:54:42 -0800 Subject: [PATCH] Document the behaviour of ** with files In #129 there's an example of how to use ** with files, include that in the doc comment. --- src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a28a710..fef8090 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -524,10 +524,14 @@ impl fmt::Display for PatternError { /// /// - `*` matches any (possibly empty) sequence of characters. /// -/// - `**` matches the current directory and arbitrary subdirectories. This -/// sequence **must** form a single path component, so both `**a` and `b**` -/// are invalid and will result in an error. A sequence of more than two -/// consecutive `*` characters is also invalid. +/// - `**` matches the current directory and arbitrary +/// subdirectories. To match files in arbitrary subdiretories, use +/// `**/*`. +/// +/// This sequence **must** form a single path component, so both +/// `**a` and `b**` are invalid and will result in an error. A +/// sequence of more than two consecutive `*` characters is also +/// invalid. /// /// - `[...]` matches any character inside the brackets. Character sequences /// can also specify ranges of characters, as ordered by Unicode, so e.g.