borg-completion(1)
π borg-completion β bestie, let's make your shell psychic π
Okay so this is the borg-completion page from the borg backup tool, and it's genuinely one of the cutest little commands in the whole toolbox. It makes your shell go β¨autocompleteβ¨ for borg stuff. No cap.
πΈ NAME πΈ
borg-completion β spits out a shell completion script for whichever shell you ask for. That's it. That's the whole job. And it slays at it.
π SYNOPSIS π
borg [common options] completion [options] SHELL
π¦ DESCRIPTION π¦
So here's the tea: this command prints a shell completion script for the shell you name. Hand it to your shell, and suddenly you're tab-completing like a main character. π
Now, important heads-up, bestie, because this is the part people sleep on:
Some of the completions are dynamic β like archive IDs. For those, the shell completion script will literally call borg to go query the repository. And that works best when that call can happen without prompting you for user input, so you may want to set the BORG_REPO and BORG_PASSPHRASE environment variables. Set them. Thank me later. π
And a special lil' note for the tcsh girlies:
- In tcsh, completions for positional arguments are matched by word position. So like, an archive name is only completed if no options precede it. Which is one more reason to use
BORG_REPOthere rather than--repo. π«Ά - Also in tcsh, options are matched by name only, so
--sort-byoffers the union of the sort keys valid forlist,diffand the commands filtering archives.
That's not a bug, it's just how tcsh is built. We respect it. π
β¨ OPTIONS β¨
Peep borg-common(1) for the common options of Borg commands β those are the shared ones, not this command's own thing.
π arguments
SHELLβ the shell you want to generate completion for (one of:%(choices)s)
π₯ EXAMPLES π₯
Want completion live in your current shell session? Just evaluate the output of this command. Want it to stick around forever and ever (obsessed)? Add the corresponding line to your shell's startup file. Iconic behavior. π
# Bash (in ~/.bashrc)
eval "$(borg completion bash)"
# Zsh (in ~/.zshrc)
eval "$(borg completion zsh)"
π« SEE ALSO π«
π Author π
The Borg Collective
And that's the whole page, fr fr. Officially part of the borg backup tool, dated 2026-10-07. Go forth and tab-complete, bestie β it's giving efficiency, it's giving luxury, it's giving borg-completion(1). πβ¨ππ¦
π¦ where this page comes from
- ubuntu stonking: borgbackup2 2.0.0b25-4 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms