Skip to main content

Setups click completion after install.

Project description

Click Completion Installer

Helps setting up click-completion when a pip package with click is installed. Supports

  • bash
  • fish (currently not implemented)
  • zsh (currently not implemented)

Using in your setup.py (setuptools)

  • append as requirement to your setup.py
REQUIRED = [ 'click', 'inquirer', 'arrow', 'pathlib', 'click-completion-helper', 'click-default-group' ]
...

class InstallCommand(install):
    def run(self):
        install.run(self)
        self.setup_click_autocompletion()

    def setup_click_autocompletion(self):
        for console_script in setup_cfg['options']['entry_points']['console_scripts']:
            console_call = console_script.split("=")[0].strip()

            # if click completion helper is fresh installed and not available now
            subprocess.run([
                "click-completion-helper",
                "setup",
                console_call,
            ])


setup(
    ...
    setup_requires=['click-completion-helper', ...],

    ...
)

or in setup.cfg:


[options]
setup_requires =
  click-completion-helper

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

click-completion-helper-0.0.7.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file click-completion-helper-0.0.7.tar.gz.

File metadata

  • Download URL: click-completion-helper-0.0.7.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

File hashes

Hashes for click-completion-helper-0.0.7.tar.gz
Algorithm Hash digest
SHA256 a0f69251ce358a254165d7451e346825efc5d930bcc1ed1f0acd5cc3e4437377
MD5 8fea05ed03b5e93881c29998830a728f
BLAKE2b-256 32b415aade837dd7b7e090a26b537e772307ec7396f4a1b13218926c413e6435

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page