summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordana <dana@dana.is>2020-10-16 08:52:42 -0500
committerGitHub <noreply@github.com>2020-10-16 09:52:42 -0400
commit145cef2eff6e10f3a5dbe1cab4ff0f7f2bc5a2a7 (patch)
tree18176b2faa1f6675e549661f913bc3902b0efa41
parent20534fad0404417487318dcc7d6fb5a91835a278 (diff)
doc: elaborate on the function of -u/--unrestricted
Fixes #1703
-rw-r--r--crates/core/app.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/core/app.rs b/crates/core/app.rs
index 74cddbf0..056dc33f 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -1945,6 +1945,10 @@ Don't respect ignore files (.gitignore, .ignore, etc.). This implies
This does *not* imply --no-ignore-files, since --ignore-file is specified
explicitly as a command line argument.
+When given only once, the -u flag is identical in behavior to --no-ignore and
+can be considered an alias. However, subsequent -u flags have additional
+effects; see --unrestricted.
+
This flag can be disabled with the --ignore flag.
"
);
@@ -2950,8 +2954,9 @@ fn flag_unrestricted(args: &mut Vec<RGArg>) {
const LONG: &str = long!(
"\
Reduce the level of \"smart\" searching. A single -u won't respect .gitignore
-(etc.) files. Two -u flags will additionally search hidden files and
-directories. Three -u flags will additionally search binary files.
+(etc.) files (--no-ignore). Two -u flags will additionally search hidden files
+and directories (--hidden). Three -u flags will additionally search binary files
+(--binary).
'rg -uuu' is roughly equivalent to 'grep -r'.
"