My Python script accepts a number of options such as the following:
python ./Controller.py create 1
python ./Controller.py destroy
Is there anyways I can get intellisense to work in the command-line? For instance, typing the following:
python ./Controller.py <TAB><TAB>
should give the following:
create - <description>
destroy - <description>
Is there a good way to do this in a portable way?
For bash, this feature is known as Bash Completion. Other shells may have similar functionality. Here’s the official reference for it: Programmable Completion.
It’s important to keep in mind this is a feature of the shell, not of Python or the script you’re invoking.