mirror of
https://github.com/jht5945/finding.git
synced 2025-12-29 06:00:04 +08:00
add --skip-target-dir
This commit is contained in:
@@ -201,7 +201,16 @@ fn find_text_files(options: &Options, dir_path: &Path) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if options.skip_target_dir && p_str.ends_with("/target") {
|
||||
if options.verbose {
|
||||
clear_n_print_message(MessageType::INFO, &format!("Skip target dir: {}", p_str));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if options.skip_dot_dir && p_str.contains("/.") {
|
||||
if options.verbose {
|
||||
clear_n_print_message(MessageType::INFO, &format!("Skip dot(.) dir: {}", p_str));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if options.skip_link_dir && is_symlink(p) {
|
||||
|
||||
Reference in New Issue
Block a user