xontrib-argcomplete 0.3.2

Creator: bradpython12

Last updated:

0 purchases

xontrib-argcomplete 0.3.2 Image
xontrib-argcomplete 0.3.2 Images

Languages

Categories

Add to Cart

Description:

xontribargcomplete 0.3.2

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.



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

To switch on the debug mode run $XONTRIB_ARGCOMPLETE_DEBUG = True.
Argcomplete environment variables
Argcomplete documentation

Links

This package is the part of ergopack - the pack of ergonomic xontribs.
This package was created with xontrib cookiecutter template.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.