BK-GLOB(1)

πŸ“¦ version 7.3.3, in alpine 3.24

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 except a, b, or c. πŸ’€

πŸŽ€ 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‐etc
  • bk‐changes
  • bk‐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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms