Expands input words as you type in xonsh shell.
If you like the idea click ⭐ on the repo and tweet.
Installation
To install use pip:
xpip install xontrib-abbrevs
# or: xpip install -U git+https://github.com/xonsh/xontrib-abbrevs
Usage
This expands input words from abbrevs dictionary as you type.
Adds abbrevs dictionary to hold user-defined "command abbreviations.
The dictionary is searched as you type the matching words are replaced
at the command line by the corresponding dictionary contents once you hit
'Space' or 'Return' key.
For instance a frequently used command such as git status can be abbreviated to gst as follows:
xontrib load abbrevs
abbrevs['gst'] = 'git status'
gst # Once you hit <space> or <return> 'gst' gets expanded to 'git status'.
one can set a callback function that receives current buffer and word to customize the expanded word based on context
abbrevs['ps'] = lambda buffer, word: "procs" if buffer.text.startswith(word) else word
It is also possible to set the cursor position after expansion with,
abbrevs['gp'] = "git push <edit> --force"
Credits
This package was created with xontrib template.
Metadata
Release files for xontrib-abbrevs 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xontrib_abbrevs-0.1.1.tar.gz | 8.2 kB | Without provenance | Details for xontrib_abbrevs-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xontrib_abbrevs-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for xontrib_abbrevs-0.1.1-py3-none-any.whl |
Total release size: 13.3 kB
Release files / xontrib_abbrevs-0.1.1.tar.gz
| Download URL | xontrib_abbrevs-0.1.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4cbf035c064e485bce132322fd9c51742bf162788e4ef53899a21b915de8f84
|
|
BLAKE2b-256 checksum How to use checksums |
fad062d387148066c2896d7d333f214f0116695e92c62c8c89acf78986df298a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / xontrib_abbrevs-0.1.1-py3-none-any.whl
| Download URL | xontrib_abbrevs-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b8e1ea18c4f11f9bafdca3015ee1282ab509eceddc211eeb2cdc28a3a5b65c5
|
|
BLAKE2b-256 checksum How to use checksums |
9746ee039f68d580e37690c1fd2f32632b153411427ad2d2b656cfb419c2b2e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for xontrib-abbrevs 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.