Repository: sharkdp/fd
File: src/cli.rs (Rust)

Code before:
                         means that search results will be shown with respect to the given base \
                         path. Note that relative paths which are passed to fd via the positional \
                         <path> argument or the '--search-path' option will also be resolved \
                         relative to this directory."
    )]
    pub base_directory: Option<PathBuf>,

    /// the search pattern (a regular expression, unless '--glob' is used; optional)
    #[arg(
        default_value = "",
        hide_default_value = true,
        value_name = "pattern",
        long_help = "the search pattern which is either a regular expression (default) or a glob \
                 pattern (if --glob is used). If no pattern has been specified, every entry \
                 is considered a match. If your pattern starts with a dash (-), make sure to \
                 pass '--' first, or it will be considered as a flag (fd -- '-foo')."
    )]
    pub pattern: String,

    /// Additional search patterns that need to be matched
    #[arg(
        long = "and",
        value_name = "pattern",
        long_help = "Add additional required search patterns, all of which must be fulfilled. Multiple \
                     additional patterns can be specified. The patterns are regular expressions,
                     unless '--glob'or '--fixed-strings' is used.",
        hide_short_help = true
    )]
    pub exprs: Option<Vec<String>>,

    /// Set path separator when printing file paths
    #[arg(
        long,
        value_name = "separator",
        hide_short_help = true,
        long_help = "Set the path separator to use when printing file paths. The default is \
                         the OS-specific separator ('/' on Unix, '\\' on Windows)."
    )]
    pub path_separator: Option<String>,

    /// the root directories for the filesystem search (optional)
    #[arg(action = ArgAction::Append,
        value_name = "path",
        long_help = "The directory where the filesystem search is rooted (optional). If \
                     omitted, search the current working directory.",
        )]
    path: Vec<PathBuf>,

    /// Provides paths to search as an alternative to the positional <path> argument
    #[arg(
        long,

Review comment (suggestion):
```suggestion
                     unless '--glob' or '--fixed-strings' is used.",
```

Code after:
        value_name = "pattern",
        long_help = "the search pattern which is either a regular expression (default) or a glob \
                 pattern (if --glob is used). If no pattern has been specified, every entry \
                 is considered a match. If your pattern starts with a dash (-), make sure to \
                 pass '--' first, or it will be considered as a flag (fd -- '-foo')."
    )]
    pub pattern: String,

    /// Set path separator when printing file paths
    #[arg(
        long,
        value_name = "separator",
        hide_short_help = true,
        long_help = "Set the path separator to use when printing file paths. The default is \
                         the OS-specific separator ('/' on Unix, '\\' on Windows)."
    )]
    pub path_separator: Option<String>,

    /// the root directories for the filesystem search (optional)
    #[arg(action = ArgAction::Append,
        value_name = "path",
        long_help = "The directory where the filesystem search is rooted (optional). If \
                     omitted, search the current working directory.",
        )]
    path: Vec<PathBuf>,

    /// Provides paths to search as an alternative to the positional <path> argument
    #[arg(
        long,
        conflicts_with("path"),
        value_name = "search-path",
        hide_short_help = true,
        long_help = "Provide paths to search as an alternative to the positional <path> \
                     argument. Changes the usage to `fd [OPTIONS] --search-path <path> \
                     --search-path <path2> [<pattern>]`"
    )]
    search_path: Vec<PathBuf>,

    /// By default, relative paths are prefixed with './' when -x/--exec,
    /// -X/--exec-batch, or -0/--print0 are given, to reduce the risk of a
    /// path starting with '-' being treated as a command line option. Use
    /// this flag to disable this behaviour.
    #[arg(long, conflicts_with_all(&["path", "search_path"]), hide_short_help = true,
        long_help = "By default, relative paths are prefixed with './' when -x/--exec, \
    -X/--exec-batch, or -0/--print0 are given, to reduce the risk of a \
    path starting with '-' being treated as a command line option. Use \
    this flag to disable this behaviour.",
    )]
    pub strip_cwd_prefix: bool,

    #[cfg(any(unix, windows))]