Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 827 Bytes

create_dir_for_own_completions.md

File metadata and controls

29 lines (19 loc) · 827 Bytes

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