diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-06-07 14:04:20 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-06-07 15:16:10 -0400 |
commit | 1bce3b33acbfcfbfa03f1174d6e00c125cd8625d (patch) | |
tree | 9cb9efd81d667b711845878310afb39183cae847 /eval.c | |
parent | faee855b1e886dacc999e1dccf7f8e2c750f33c6 (diff) | |
download | bfs-1bce3b33acbfcfbfa03f1174d6e00c125cd8625d.tar.xz |
Implement -exclude, a special form for convenient exclusions
Fixes #8.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1193,6 +1193,11 @@ static enum bftw_action cmdline_callback(const struct BFTW *ftwbuf, void *ptr) { } } + if (eval_expr(cmdline->exclude, &state)) { + state.action = BFTW_PRUNE; + goto done; + } + if (cmdline->xargs_safe && strpbrk(ftwbuf->path, " \t\n\'\"\\")) { args->ret = EXIT_FAILURE; eval_error(&state, "Path is not safe for xargs.\n"); |