BK-FILES(1)

πŸ“¦ version 7.3.3, in alpine 3.24

πŸŽ€ bk files(1) πŸŽ€

okay bestie, welcome to the BitKeeper User’s Manual page for bk files β€” it’s literally a demo program that shows off file name expansion, no cap. Think of it as the group-chat tutorial for β€œwhich files is this command actually talking to?” πŸ’…

✨ NAME ✨

bk files β€” a demo program to show file name expansion. yes, that’s the whole vibe. 🫢

🌈 SYNOPSIS 🌈

bk files [file ... | βˆ’]

🧚 DESCRIPTION 🧚

Most BitKeeper commands are designed to operate on a set of files. This command demonstrates how to specify the set of files. Iconic teaching moment, honestly.

File names can be implied, be specified as arguments, be implied with a directory name argument, or be specified as a list on stdin. Here are the flavors, bestie:

πŸ’– Implied (nothing specified) πŸ’–

If no files are specified, the default list is every version controlled file in the current working directory. So like, it just knows. ✨

πŸ“ Listed πŸ“

If the command invocation includes a list of files at the end, then those files and only those files are operated upon by the command. If any of the specified files are a directory, then the list is expanded to include all revision controlled files associated with the specified directory. β€œonly those files” is doing main character energy there β€” do not ignore it. πŸ‘‘

πŸ”₯ All files πŸ”₯

A common thing to want to do is to run a command against all files under revision control. There is an easy way to do this:

bk ‐A command

πŸ¦‹ All user files πŸ¦‹

The previous form will list all files, including deleted files and metadata files. A more useful form is one that only lists files that are user files and are not deleted:

bk ‐U get

πŸ“ STDIN πŸ“

If the command invocation has as its last argument a βˆ’, then the command reads the standard input stream for a list of files, one per line, on which to operate. If the list is in the form

file.c|1.5
header.h|1.8
manpage|1.8..1.20

then the receiving command will operate on the supplied revision[s]. periodt. πŸ’…

🌟 WILDCARDS 🌟

It is possible to restrict the command to a specified set of files using what are called wild cards (or globs in Unix terminology). If a name specified includes a glob pattern, then only files matching that pattern are processed. Only the basename of the file is compared against the glob, not the full path name. The patterns are standard Unix glob patterns (see bk help glob) with one exception for convenience: a = may be used in place of a * to match any pattern. In order for the = alias to work, an environment variable BK_GLOB_EQUAL must be set to the value YES. To match all header files, both of the following do the same thing:

export BK_GLOB_EQUAL=YES
bk diff =.h
bk diff ’*.h’

If you have a file with an = or other glob characters in its name, you will need to either quote those characters with a proceeding backslash (i.e., \*.h matches a file named *.h), or if the file name specified contains a / then no glob expansion is applied. This makes it possible to do things like

bk diff ’./*.h’

and have that match the file named *.h. slay. πŸŽ€

πŸ’€ EXCEPTIONS πŸ’€

Certain commands do not autoexpand directories because the commands are destructive. An example is bk unedit; this command throws away any changes made to files and it refuses to autoexpand to all files, the files must be specified.

bestie, be careful here β€” bk unedit is giving β€œdelete the evidence” energy, and it will not save you by expanding directories for you. You have to name the files. 😭

🎬 EXAMPLES 🎬

See changes in the current directory:

bk diff

See all changes in the repository:

bk ‐U diff

See all changes to header files in the repository:

bk ‐U diff ’*.h’

List all C or header files containing the phrase β€œproc” in their name:

bk ‐A files ’*proc*.[ch]’

See all modified user files:

bk ‐cU

See all extra files:

bk ‐xA

πŸšͺ EXIT STATUS πŸšͺ

bk files returns exit status 0. literally successful, no notes. βœ…

πŸ‘€ SEE ALSO πŸ‘€

  • bk‐bk
  • bk‐diff
  • bk‐glob
  • bk‐gfiles

🏷️ CATEGORY 🏷️

  • File
  • Repository

mwah πŸ’‹ β€” signed off by BitKeeper Inc, with footer bits 1E1 and bk files(none). bye bestie, go expand some file names responsibly! 🌈🫢

πŸ“¦ 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