DH_SHELL...PLETIONS(1)
π DH_SHELL_COMPLETIONS π
okay bestie, welcome to the manual page for dh_shell_completions β it's a debhelper shell completions addon and honestly? she's serving. π
β¨ NAME β¨
dh_shell_completions β install shell completions for package
πΈ SYNOPSIS πΈ
dh_shell_completions [debhelper options]
π¦ DESCRIPTION π¦
So like, dh_shell_completions is a debhelper addon whose whole thing is installing completion scripts for multiple shells, and it respects the conventions of each shell like the polite little icon it is. π
Right now it supports bash, fish, and zsh. That's the roster. No cap.
To actually use it, you gotta Build-Depends on it, and then pass --with shell_completions to debhelper. That's the whole ritual, it's giving very low-effort for how much it does fr fr. β¨
There are several modes of action, and they're all listed down in MODES. Precedence check: the first one has the highest precedence, the last one has the lowest. So like, don't come for the top of the list, she goes first. π
For all the modes, any mentioned files can have comment lines, and those start with #. π
Also! $package in file names β if you justβ¦ omit it β defaults to the first binary package defined in debian/control. So you don't even have to spell it out, she'll figure it out. π
π MODES π
π§ Generation
If a file named debian/[$package.]shell-completions exists, and its first non-comment line is:
mode=gen
then the remaining lines should be one or more stanzas, each one in this format:
command=command-to-generate --completions _SHELL_ [--write-to _PATH_]
shells=bash,fish,zsh
name=foo
Let me break each of those down for you:
commandβ the command that generates a completion script. It's assumed to print to stdout unless it contains the_PATH_placeholder._SHELL_is a placeholder for each shell inshells._PATH_is an optional placeholder for the path to write the completion script to, if the command works that way.
shellsβ a comma separated list of supported shell names to generate for.nameβ an optional line to specify the name of the generated completions, if you want something other than$package.
And then: command will be run for each _SHELL_ specified in shells, and it installs the resulting completions with the specified name. Periodt. π
π Composite
If a file named debian/[$package.]shell-completions exists, and it's in this format:
$shell completions/foo # installed as foo
$shell completions/bar baz # installed as baz
then for each line, the referenced file will be installed as a completion script for $shell, named as the comments suggest. The comments are literally the instructions bestie, read them. π
π Separate
If a file named debian/[$package.]$shell-completions exists for a supported $shell, then one of two actions is taken, depending on its content.
If it's of this format:
completions/foo # installed as foo
completions/bar baz # installed as baz
then the referenced file(s) will be installed as completion(s) for $shell, named as the comments above suggest. Again with the comments. π
Otherwise, it's taken as a full completion script, and installed for $shell, named $package. And this is in line with dh_bash-completion, so it's consistent, iykyk. π₯
β SEE ALSO β
debhelper(1)
π AUTHOR π
Blair Noctis <ncts@debian.org>
and that's the whole page, bestie!! π this was version 0.1.0build1 from 2026-01-16 β go forth and complete some shells, you absolute main character π¦β¨π
π¦ where this page comes from
- ubuntu resolute: dh-shell-completions 0.1.0build1 Β· Apache-2.0
- ubuntu stonking: dh-shell-completions 0.1.0build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms