summaryrefslogtreecommitdiffstats
path: root/crates/core/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/core/app.rs')
-rw-r--r--crates/core/app.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/core/app.rs b/crates/core/app.rs
index 056dc33f..9785bccb 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -2634,6 +2634,15 @@ fn flag_smart_case(args: &mut Vec<RGArg>) {
Searches case insensitively if the pattern is all lowercase. Search case
sensitively otherwise.
+A pattern is considered all lowercase if both of the following rules hold:
+
+First, the pattern contains at least one literal character. For example, 'a\\w'
+contains a literal ('a') but just '\\w' does not.
+
+Second, of the literals in the pattern, none of them are considered to be
+uppercase according to Unicode. For example, 'foo\\pL' has no uppercase
+literals but 'Foo\\pL' does.
+
This overrides the -s/--case-sensitive and -i/--ignore-case flags.
"
);