How to make python script autocomplete filenames in terminal

865 views Asked by At

My python project contains basic script and some subscripts as follows:

project/
├── basic.py
└── subscripts/
    ├── firstscript.py
    ├── secondscript.py
    ├── thirdscript.py
    └── fourthscript.py

Project is used like this:

python basic.py nthscript -parameters -for -nth -script -here:"please"

(the subscripts/ and .py parts are added to script path by basic.py) e.g.

python basic.py secondscript -stopafterchanges:6 -verbose

My current problem is that terminal can not autocomplete when I type:

project > python basic.py t[Tab]

because these scripts are in a subfolder. Is there any option how to allow terminal autocomplete thirdscript for example (above)?

Can I add some preference . (dot) file to my project, which helps terminal/bash autocomplete from some path? Or can I give my users some easy and clear manual how to set this on their machine (all of Linux, Windows, Mac) somehow?

0

There are 0 answers