Bash Completions

Published 2025 July 28

For most commands that I run in bash, I have one or two ways that I will typically use them. My muscle memory is ok, but when I start getting a little more creative I have to open the man page or use tldr.

There is a project called bash-completion that eases this burden. The project README states:

bash-completion is a collection of command line command completions for the Bash shell, collection of helper functions to assist in creating new completions, and set of facilities for loading completions automatically on demand, as well as installing them.

To my surprise, after reviewing my ~/.bashrc, I realized that I already had bash-completion installed and enabled! I just needed to be a little more tab happy when I was typing out a flag. CLI tools can vary widely in their flagging conventions. It's hard to keep track of it all. This project makes that a little easier!