complete -W 'opt1 opt2' mycmd

Category: Shell & Bash

complete -W 'opt1 opt2' mycmd

Define tab-completion words for a command

Defines what words should appear as tab-completion options for a custom command.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.