I have a shell script that I want to run with
source foo (then hit the tab button)
You can put this into your bashrc:
complete -c source
-c stands for command names which will effectively search in PATH. But that requires that the files are executable. You could elaborate on that and program a custom completion function which uses
find to retrieve all shell scripts in PATH.