Skip to main content

A click extension to support shell completion for PowerShell 7

Project description

PS> click-pwsh

Supported Python Versions PyPI version

A click extension to support shell completion for PowerShell 7.

This extension is written based on click 8.x (i.e., the rewritten click's completion system). Be aware of your click version before using it.

Hope it can provide smooth experiences for Windows users. d(`・∀・)b

Installation

You can get the package from PyPI:

PS> pip install click-pwsh

Quickstart

Add the following code at the top of your script:

from click_pwsh import support_pwsh_shell_completion
support_pwsh_shell_completion()

And run the following command to install the shell completion:

PS> python -m click_pwsh install foo-bar
Complete.

where foo-bar is your command name.

Then ... all done. Re-open PowerShell 7 and enjoy the shell completion!

Update Shell Completion Scripts

If you upgrade click-pwsh, you can use the following command to update your shell completion scripts:

PS> python -m click_pwsh update foo-bar
Complete.

where foo-bar is your command name whose shell completion scripts have already installed before.

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_pwsh-0.9.4.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

click_pwsh-0.9.4-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

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