summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-05-13 23:28:01 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-05-13 23:28:01 -0400
commit5f3c1e965720d46bc00d2f4d98ac6bc34f8a022e (patch)
tree4e1ad410b4dce9f21b4c9be1d1112500adf3f0de /src
parentb180a0e78bd81376491ea2a9ac6349e25f7e52d4 (diff)
downloadbfs-5f3c1e965720d46bc00d2f4d98ac6bc34f8a022e.tar.xz
parse: Warn on paths found within -exclude
Diffstat (limited to 'src')
-rw-r--r--src/parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index 65087a0..96f03dd 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -608,6 +608,11 @@ static int skip_paths(struct parser_state *state) {
}
}
+ if (state->excluding) {
+ parse_warning(state, "This path will not be excluded. Use a test like ${blu}-name${rs} or ${blu}-path${rs}\n");
+ bfs_warning(state->ctx, "within ${red}-exclude${rs} to exclude matching files.\n\n");
+ }
+
if (parse_root(state, arg) != 0) {
return -1;
}