nvrim/cli/fd.rs
1//! `fd` CLI flag builder implementation.
2//!
3//! Implements [`CliFlags`] for `fd`, producing base flags and exclusion patterns derived from the shared glob
4//! blacklist.
5
6use crate::cli::CliFlags;
7
8/// CLI flags for the `fd` command.
9pub struct FdCliFlags;
10
11impl CliFlags for FdCliFlags {
12 /// Returns the base flags for the `fd` command.
13 fn base_flags() -> Vec<&'static str> {
14 vec!["--color never", "--follow", "--hidden", "--no-ignore-vcs", "--type f"]
15 }
16
17 /// Returns the exclude flag for the given glob pattern.
18 fn glob_flag(glob: &str) -> String {
19 format!("--exclude '{glob}'")
20 }
21}