Glob
Wildcard pattern matching over filenames, similar enough to regular expressions to mislead.
A glob is a wildcard pattern for matching paths: an asterisk matching within a segment, a double asterisk matching across segments, a question mark matching one character, and brackets enclosing a character class.
Globs resemble regular expressions and behave differently in ways that produce silent, confident errors.
Bracket syntax is a character class. A path containing literal square brackets — a routing convention in several frameworks uses them — is parsed as a set of characters, so the pattern matches nothing and any rule attached to it never applies. There is no error; the configuration block is simply inert.
Leading-directory matching applies only to literal patterns. In several tools a bare directory path means "everything under it", but the moment the pattern contains a wildcard it is matched against the whole path — so a pattern ending at a directory name matches zero files, forever, and any check built on it passes on every input.
Zero matches is success. A command whose pattern matched nothing exits cleanly, so a gate built on it reads as a guarantee.
The habit that closes all three: enumerate what the pattern matches before relying on it. Listing the matched files is a one-second command and converts an assumption into a count. See Vacuous Truth and Silent Failure.
See also3
Hand-picked in the note itself — the neighbours worth reading next.
Shell
The interactive command interpreter, and a programming language with unusually sharp edges.
Systems & Tooling15 connections
Truncation Bias
Reading a truncated result as if it were the whole result, so every counterexample is invisible.
Method15 connections
Falsifiability
A claim is only worth something if you know what observation would refute it.
Method16 connections
Related4
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from6
Notes elsewhere in the wiki that reach for this one.
- Character EncodingSystems & Tooling
The mapping between characters and bytes, and the source of a specific family of invisible bugs.
- FalsifiabilityMethod
A claim is only worth something if you know what observation would refute it.
- ShellSystems & Tooling
The interactive command interpreter, and a programming language with unusually sharp edges.
- Silent FailureMethod
A failure that produces no signal, so the absence of an error reads as success.
- Truncation BiasMethod
Reading a truncated result as if it were the whole result, so every counterexample is invisible.
- Vacuous TruthMethod
A statement that holds only because its subject set is empty — a green result that measured nothing.