BK-GLOB(1)
bk glob β demo program to show glob pattern expansion π
okay bestie, welcome to the BitKeeper Userβs Manual page for bk glob(none) β yes, that whole string is the manual name, and this command is literally a demo program to show glob pattern expansion. No cap, itβs giving βletβs test your wildcard understandingβ energy. π¦
β¨ NAME β¨
bk glob β demo program to show glob pattern expansion. Thatβs the whole name section, and it ate. π
π¦ SYNOPSIS π¦
bk glob pattern string [string string ...]
You pass a pattern first, then one or more string arguments. The [string string ...] bit means βmore strings can keep coming,β bestie. β¨
π DESCRIPTION π
Some BitKeeper interfaces use what are called βglob patterns,β sometimes known as wild cards. Examples include the configuration file, history listing (bk changes), and file name expansion (bk files).
This command may be used to match a glob against one or more strings to see examples of how the pattern matching works. So itβs literally a little playground for vibing out the matching rules. π
π WILDCARD MATCHING π
A string is a glob pattern if it contains one of the characters *, ?, [, or sometimes =. (The last one, =, is an alias for *, to avoid shell quoting in many cases. See CONFIGURATION below.) The glob pattern is used to match one or more strings (or file names), usually in a process that takes a glob pattern and a list of possible matches and returns the subset of the list which matches the glob pattern. Matching works as follows:
?β Matches any single character (unless?is between brackets). π*β Matches any string (unless*is between brackets). π₯[...]β A set of characters enclosed in brackets matches a single character if and only if the character is in the set. π«Ά[Λ...]β As above but inverts the set. In other words[Λabc]matches any character excepta,b, orc. π
π CONFIGURATION π
It is possible to disable all use of globs in file name expansion by setting the environment variable BK_NO_FILE_GLOB to any value.
Since aliasing = for * is not a standard feature and it may cause problems when processing files with = as part of their name, it must be explicitly enabled by setting BK_GLOB_EQUAL to the value of YES. No other value will enable this feature. Periodt. π
π EXAMPLES π
Test a simple pattern match that matches file.c and file.h:
bk glob β*.[ch]β file.c file.h file.1
List all files ending in β.1β:
export BK_GLOB_EQUAL=YES
bk βA files =.1
See changes in all header files in the current directory:
bk diff β*.hβ
See the revision history for all C/header files with the phrase βsccsβ in their name:
bk sccslog β*sccs*.[ch]β
See all changesets which include the phrase βBUGID:β followed by a number:
bk changes ββ/BUGID:[123456789]/β
Obsessed with how clean these examples are, ngl. β¨
π BUGS π
Sets of characters, i.e., [AβZ], have only marginal support. Escaping the minus in the set is not supported. So like, donβt come for the edge cases, bestie β they are lowkey not fully there. π
π SEE ALSO π
bkβconfigβetcbkβchangesbkβfiles
Go read these when youβre done slaying this page, iykyk. π«Ά
πΈ CATEGORY πΈ
- File
- Repository
Itβs giving file-and-repository main character energy. π
okay thatβs the whole manual page! The footer line β source/version and date zone β credits BitKeeper Inc and 201E1, and the manual tag is bk glob(none). Byeeee, go match some globs. π
π¦ where this page comes from
- alpine 3.24: bitkeeper-doc 7.3.3-r1 Β· Apache-2.0
- Copyright (c) 1998-2015 BitKeeper Inc
- Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms