I have made a script that lists available projects. You can start a project by entering script start <project>.Now it would be great to enable autocompletion, so if you're entering start Organand press TAB, it autocompletes to start Organisation.The difficult part is that the list of projects is dynamic. The list of available projects changes frequently and all users have different available projects. My idea was to save the available projects into a json file and use this file to enable the autocompletion. I know that I have to create a file in /etc/bash_completion.d/, but I don't know how I can implement a dynamic autocompletion that depends on the available projects. 
How to implement dynamic bash auto completion
bash;shell;autocomplete