Skip to main content

Argcomplete support for python and xonsh scripts in xonsh shell.

Project description

Argcomplete support for python and xonsh scripts in xonsh shell.

If you like the idea click ⭐ on the repo and stay tuned by watching releases.

[Demo]
Screenshot made with xontrib-prompt-bar and Konsole.

Install

xpip install xontrib-argcomplete
echo 'xontrib load argcomplete' >> ~/.xonshrc
# Reload xonsh

Usage

Before usage you must add the argcomplete support to your script. The PYTHON_ARGCOMPLETE_OK marker should be found in the first 10 lines of the file.

The argcomplete xonsh completer will be activated with this cases:

python script.py
./script.py
./path/script.py

xonsh script.xsh
./script.xsh
./path/script.xsh

# scripts without extension should have "env python" or "env xonsh" or path to python/xonsh in the shebang
./script
script    # script should be found in $PATH

Example

xpip install xontrib-argcomplete
xontrib load argcomplete

cd /tmp && git clone https://github.com/anki-code/xontrib-argcomplete
cd xontrib-argcomplete/tests

python proto.py <Tab>  # Suggestions: --help --proto -h
./proto.py --proto tt<Tab>  # Suggestions: http https
./proto.xsh --proto tt<Tab>  # Suggestions: http https
./proto --proto tt<Tab>  # Suggestions: http https

$PATH.append($PWD)
proto --proto tt<Tab>  # Suggestions: http https

Known issues

Windows is not supported. PRs are welcome!

Development

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

xontrib-argcomplete-0.3.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

xontrib_argcomplete-0.3.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file xontrib-argcomplete-0.3.0.tar.gz.

File metadata

  • Download URL: xontrib-argcomplete-0.3.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for xontrib-argcomplete-0.3.0.tar.gz
Algorithm Hash digest
SHA256 aa16647ea47e2a02e9af0c0240e02d328abe155499d173d2ab1c1d0554fe7d1e
MD5 585286ea90b8e7cfe74658cf8417dd00
BLAKE2b-256 b8308bc003878794859e384a482841da1e583311575fce5c4672c9e5a7ec74fc

See more details on using hashes here.

File details

Details for the file xontrib_argcomplete-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: xontrib_argcomplete-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for xontrib_argcomplete-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4d80b25e7e78d795fa9b1e2f290f12b26ffd7cca4dc3c44d1a0c32b11a1aa41
MD5 135ae5adcd7d4d6c7d674474b84a08d9
BLAKE2b-256 ae753de912d5b4ff424c1c9a72265dfb57194216d30cd436b935d9fdd0a0c62d

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