Lazarus Lazaridis iridakos.com

How to create a bash completion script

A tutorial for adding bash completion to scripts using the bash programmable completion facilities.

Why bother?

  • to save users from typing text when it can be auto-completed
  • to help users know what are the available continuations to their commands
  • to prevent errors and improve their experience by hiding or showing options based on what users have already typed

I'm a tab-completion junkie, so the more people that know how to do this, the better!

0:00 / 0:00