Skip to main content

pattern_has_glob_metacharacters

Function pattern_has_glob_metacharacters 

Source
pub fn pattern_has_glob_metacharacters(
    pattern: &str,
    enable_extended_globbing: bool,
) -> bool
Expand description

Returns whether a pattern string contains any glob metacharacters.

Uses the same PEG grammar rules that pattern_to_regex_str uses, keeping a single source of truth for what constitutes a glob metacharacter.

ยงArguments

  • pattern - The shell pattern to check.
  • enable_extended_globbing - Whether to enable extended globbing (extglob).