From 145cef2eff6e10f3a5dbe1cab4ff0f7f2bc5a2a7 Mon Sep 17 00:00:00 2001 From: dana Date: Fri, 16 Oct 2020 08:52:42 -0500 Subject: [PATCH] doc: elaborate on the function of -u/--unrestricted Fixes #1703 --- crates/core/app.rs | 9 +++++++-- 1 file 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) { 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'. "