Skip to content

Completions

github-actions[bot] edited this page Sep 5, 2026 · 1 revision

mlab completions and mlab man

Both write to stdout, so both are one redirect away from being installed.

Shell completions

mlab completions zsh  > ~/.zfunc/_mlab
mlab completions bash > /etc/bash_completion.d/mlab
mlab completions fish > ~/.config/fish/completions/mlab.fish

bash, zsh, fish, elvish and powershell are supported.

The script is generated from the command tree itself, so it never drifts from the binary: every sub-command, every flag and every fixed value set — the severities, the output formats — completes because the parser already knows them.

zsh

mkdir -p ~/.zfunc
mlab completions zsh > ~/.zfunc/_mlab

with ~/.zfunc on fpath before compinit runs:

fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit

bash

System-wide, if you can write there:

mlab completions bash | sudo tee /etc/bash_completion.d/mlab > /dev/null

Otherwise source it from your ~/.bashrc:

mlab completions bash > ~/.local/share/mlab-completion.bash
echo 'source ~/.local/share/mlab-completion.bash' >> ~/.bashrc

Man page

mlab man > /usr/local/share/man/man1/mlab.1
man mlab

A roff page, generated from the same command tree — the descriptions in it are the ones in --help.

Regenerate both after an upgrade. Neither is shipped in the packages, because a stale completion script is more annoying than none.

Clone this wiki locally