1

There's many resources floating around on how to hook up your own Python shell with autocompletion (using readline, or rcompleter) but none seem to mention how to do this for the command wrappers generated for pkg_resources' console_scripts. Is it possible to have pip register autocompletion for an installed package's commands?

> pip install my_pkg
> my_pkg <autocompletion>

I register the my_pkg command like this in setup.py:

setuptools.setup(
    # ...
    entry_points={"console_scripts": ["my_pkg = my_pkg:cli"]}
)
Robin De Schepper
  • 4,942
  • 4
  • 35
  • 56

1 Answers1

0

you must mkdir dir in root

like this

|-- setup.py

|-- your_lib_dir

|---- my_pkg.py
setuptools.setup(
    # ...
    entry_points={"console_scripts": ["my_pkg = your_lib_dir:my_pkg:cli"]}
)
  • 1
    Hmmm, no, this does not answer my question. The question is whether pip can handle the registration of the **autocompletion** of my command. – Robin De Schepper Mar 02 '21 at 11:47