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
Shell
The interactive command interpreter, and a programming language with unusually sharp edges.
Systems & Tooling24 connections
Truncation Bias
Reading a truncated result as if it were the whole result, so every counterexample is invisible.
Method28 connections
Falsifiability
A claim is only worth something if you know what observation would refute it.
Method47 connections
Related6
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from8
- Character EncodingSystems & Tooling
The mapping between characters and bytes, and the source of a specific family of invisible bugs.
- Command-Line InterfaceSystems & Tooling
Operating a computer by typing commands and reading text replies, the interface inherited from teletypes that remains the fastest, most scriptable, and least discoverable way to control software.
- FalsifiabilityMethod
A claim is only worth something if you know what observation would refute it.
- GitignoreVersion Control & Delivery
The file of patterns telling Git which files to leave untracked, such as build output, dependencies, editor clutter, and local secrets, along with the traps of files that were already tracked and secrets already committed.
- 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.