Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
|Logo|
|PyPI-Downloads| |Tests| |Coverage| |PyPI| |Conda|
argcomplete <https://pypi.org/project/argcomplete>
_ and
pyzshcomplete <https://pypi.org/project/pyzshcomplete>
_ are slow and have
side-effectsshtab
processes an argparse.ArgumentParser
object to generate a
tab completion script for your shellOutputs tab completion scripts for
bash
zsh
tcsh
Supports
argparse <https://docs.python.org/library/argparse>
_docopt <https://pypi.org/project/docopt>
_ (via argopt <https://pypi.org/project/argopt>
_)Supports arguments, options and subparsers
Supports choices (e.g. --say={hello,goodbye}
)
Supports file and directory path completion
Supports custom path completion (e.g. --file={*.txt}
)
.. contents:: Table of Contents :backlinks: top
Choose one of:
pip install shtab
, orconda install -c conda-forge shtab
See operating system-specific instructions in the docs <https://docs.iterative.ai/shtab/#installation>
_.
There are two ways of using shtab
:
CLI Usage <https://docs.iterative.ai/shtab/use/#cli-usage>
_: shtab
's own CLI interface for external applications
shtab your_cli_app.your_parser_object
Library Usage <https://docs.iterative.ai/shtab/use/#library-usage>
_: as a library integrated into your CLI application
your_cli_app --print-completion {bash,zsh,tcsh}
your_cli_app completion {bash,zsh,tcsh}
See the docs for usage examples <https://docs.iterative.ai/shtab/use/#main.py>
_.
Not working? Check out frequently asked questions <https://docs.iterative.ai/shtab/#faqs>
_.
argcomplete <https://pypi.org/project/argcomplete>
_
<TAB>
is pressed (slow and
has side-effects)bash
completionpyzshcomplete <https://pypi.org/project/pyzshcomplete>
_
<TAB>
is pressed (slow and
has side-effects)zsh
completionclick <https://pypi.org/project/click>
_
argparse
Please do open issues <https://github.com/iterative/shtab/issues>
_ & pull requests <https://github.com/iterative/shtab/pulls>
_! Some ideas:
fish
powershell
See
CONTRIBUTING.md <https://github.com/iterative/shtab/tree/main/CONTRIBUTING.md>
_
for more guidance.
|Hits|
.. |Logo| image:: https://github.com/iterative/shtab/raw/main/meta/logo.png .. |Tests| image:: https://img.shields.io/github/actions/workflow/status/iterative/shtab/test.yml?logo=github&label=tests :target: https://github.com/iterative/shtab/actions :alt: Tests .. |Coverage| image:: https://codecov.io/gh/iterative/shtab/branch/main/graph/badge.svg :target: https://codecov.io/gh/iterative/shtab :alt: Coverage .. |Conda| image:: https://img.shields.io/conda/v/conda-forge/shtab.svg?label=conda&logo=conda-forge :target: https://anaconda.org/conda-forge/shtab :alt: conda-forge .. |PyPI| image:: https://img.shields.io/pypi/v/shtab.svg?label=pip&logo=PyPI&logoColor=white :target: https://pypi.org/project/shtab :alt: PyPI .. |PyPI-Downloads| image:: https://img.shields.io/pypi/dm/shtab.svg?label=pypi%20downloads&logo=PyPI&logoColor=white :target: https://pepy.tech/project/shtab :alt: Downloads .. |Hits| image:: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&style=social&r=https://github.com/iterative/shtab&a=hidden :target: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social :alt: Hits
FAQs
Automagic shell tab completion for Python CLI applications
We found that shtab demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.