clap can generate bash, fish, zsh and even PowerShell completion files at compile time! These can then be installed alongside your application giving full shell tab-completions of all flags, options, subcommands and even specific argument values!

Here are two examples of completions in action using Rust’s rustup tool as an example!

Using ZSH


or GIFV

Using Bash


or GIFV