glob

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 2 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package glob is the blocklist matcher: case-insensitive `*` wildcards, shared by the notification blocklist and the systray blacklist (wayle-core's glob.rs).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindWildcard

func FindWildcard(patterns []string, values []string, text string) (string, bool)

FindWildcard is glob::find_match: the value of the first pattern that matches text, in the given order.

func Fold

func Fold(text, pattern string) bool

Fold is shell-core icons.rs's matches_glob: the text lowercased, equal to the (already lowercased) pattern, or matching it as a glob.

func Glob

func Glob(pattern, text string) bool

Glob is the glob crate's Pattern::new(pattern).matches(text), as the hyprland workspace ignore list uses it: an invalid pattern never matches.

func Match

func Match(pattern, name string) bool

Match reports whether name matches the wildcard pattern.

func Wildcard

func Wildcard(pattern, text string) bool

Wildcard is wayle-shell-core's glob::matches (the wildcard crate): case-sensitive, byte-wise, `*` for any run and `?` for exactly one byte, `\` escaping one of `*`, `?`, `\`. A malformed pattern (a dangling or needless escape) never matches, as the crate's constructor error does.

Types

type Pattern

type Pattern struct {
	// contains filtered or unexported fields
}

Pattern is a compiled glob crate Pattern, for callers that match one pattern against many texts (the launcher's glob matching).

func Compile

func Compile(pattern string) (Pattern, bool)

Compile is glob::Pattern::new: false for a syntax error (a `***`, a `**` that is not a whole path component, an unterminated `[`).

func (Pattern) Matches

func (p Pattern) Matches(text string, caseSensitive bool) bool

Matches is Pattern::matches_with: `*` crosses separators, no leading-dot rule, and case folding (ASCII only, as the crate does) unless caseSensitive.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL