Completion Scripts

Overview

Shell completion scripts enables tab completion for commands, subcommands, options, and arguments in your preferred shell.

Once installed, shell completion allows you to:

  • Tab-complete commands: Type rudof val<TAB> → rudof validate
  • Tab-complete options: Type rudof validate --sh<TAB> → rudof validate --schema
  • Tab-complete file paths: Automatically suggest files and directories for file arguments
  • View available options: Press TAB twice to see all available options at any point
  • Reduce typos: Let the shell validate command names and options before execution

Supported Shells

Completion scripts are generated for the following shells:

  • Bash - The Bourne Again SHell, default on most Linux distributions
  • Zsh - Z shell, default on macOS (10.15+) and popular among advanced users
  • Fish - The friendly interactive shell with built-in completion support
  • PowerShell - Microsoft PowerShell for Windows, Linux, and macOS
  • Elvish - A modern shell with a unique approach to scripting
  • Nushell - A modern shell with structured data pipelines

Getting the scripts

Every GitHub release ships a rudof_completions.zip asset containing the completion script for each shell above. Download the archive matching the release you installed, pick the file for your shell, and skip to Installation Instructions below.

Via the Nix module

If you use the programs.rudof NixOS or home-manager module (see the Nix module options reference), it installs the completions with the package. Nothing more is necessary.

Generating them yourself

A small helper binary of the rudof_cli crate, rudof-completions, generates the scripts from the argument parser of rudof. It is not a rudof subcommand. From a checkout:

cargo run --release --bin rudof-completions -- <SHELL>

Installation Instructions

After obtaining the completion script, you need to install it in the appropriate location for your shell. The installation process varies by shell.

Note

The official documentation of each completion system has more information: