Fixed the example code.
Add a directory for my own completion code.
Generalized this shell script.