From 17bd256ae6e4a8322552024e7d70644927912650 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sun, 6 Dec 2020 14:57:47 +0100 Subject: [PATCH] Improve --fixed-strings help text, closes #627 --- doc/fd.1 | 3 ++- src/app.rs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/fd.1 b/doc/fd.1 index 2c50a1e..70804d2 100644 --- a/doc/fd.1 +++ b/doc/fd.1 @@ -60,7 +60,8 @@ Perform a glob-based search instead of a regular expression search. Perform a regular-expression based search (default). This can be used to override --glob. .TP .B \-F, \-\-fixed\-strings -Treat the pattern as a literal string instead of a regular expression. +Treat the pattern as a literal string instead of a regular expression. Note that this also +performs substring comparison. If you want to match on an exact filename, consider using '\-\-glob'. .TP .B \-a, \-\-absolute\-path Shows the full path starting from the root as opposed to relative paths. diff --git a/src/app.rs b/src/app.rs index d42ade3..0b4e121 100644 --- a/src/app.rs +++ b/src/app.rs @@ -117,7 +117,9 @@ pub fn build_app() -> App<'static, 'static> { .overrides_with("fixed-strings") .hidden_short_help(true) .long_help( - "Treat the pattern as a literal string instead of a regular expression.", + "Treat the pattern as a literal string instead of a regular expression. Note \ + that this also performs substring comparison. If you want to match on an \ + exact filename, consider using '--glob'.", ), ) .arg(