views:

34

answers:

1

I've noticed that some programs have their own tab-completion.

For example, git:

git checkout 

allows for tab completion of branch names.

How is this accomplished?

+4  A: 

Use compgen and complete (article about custom bash completing).

ChristopheD