TECHNICAL REFERENCE · NOVEMBER 2026
Bash completion essentials
Everyday completion
TAB completes commands, paths and other words. A second TAB may list alternatives depending on Readline configuration.
Check configuration
type _init_completion
complete -p ssh
shopt -p progcomp
How it works
Bash invokes a completion specification for a command, if registered. The completion function examines command-line context and returns candidates.
Common commands
complete -p
compgen -c -- sys
help complete
help compgen