til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

Create directory for own bash completions

When you implement your own bash completions you can with luck install them in a local directory in your $HOME directory and then create a small shell helper script to source these.

Create the file: ~/.bash_completion, containing the code below:

for bcfile in ~/.bash_completion.d/* ; do
  . $bcfile
done

Create a directory for your completions:

$ mkdir ~/.bash_completion.d

Copy your completions into the newly created directory:

$ cp your_bash_completion ~/.bash_completion.d/

Start a new shell and you should be good to go.

Resources and References