Useful xonsh-shell commands/alias functions
Project description
Useful xonsh-shell commands/alias/completer functions
Installation
To install use pip:
xpip install xontrib-commands
# or: xpip install -U git+https://github.com/jnoortheen/xontrib-commands
Usage
xontrib load commands
building alias
Use xontrib.commands.Command
to build arger dispatcher
for your functions.
from xontrib.commands import Command
@Command.reg
def record_stats(pkg_name=".", path=".local/stats.txt"):
stat = $(scc @(pkg_name))
echo @($(date) + stat) | tee -a @(path)
Now a full CLI is ready
$ record-stats --help
usage: xonsh [-h] [-p PKG_NAME] [-a PATH]
optional arguments:
-h, --help show this help message and exit
-p PKG_NAME, --pkg-name PKG_NAME
-a PATH, --path PATH
Commands
- each of the commands use argparser. Please use
cmd --help
to get more info and usage examples.
1. reload-mods
2. report-key-bindggs
3. dev
- command to cd around fast.
- much like https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/pj
Credits
This package was created with xontrib cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xontrib-commands-0.2.5.tar.gz
.
File metadata
- Download URL: xontrib-commands-0.2.5.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.7-3-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cfec8dacb4c298588dcbcc8bba244faf1613608a4983a2c3a390cdfee058402 |
|
MD5 | c4cbbad0ce5815d13e939a35cf3c7b8d |
|
BLAKE2b-256 | dc2089c7d72d016d4e1207aee2545ee71e0f93027ae7f188ccd5c47e8570ecb1 |
File details
Details for the file xontrib_commands-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: xontrib_commands-0.2.5-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.7-3-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014444838b98eefbe1a62c43c6aeadde5fd6ce1740b2c742864f41c7d00ce9f6 |
|
MD5 | c56bc976663682419d7e55465254d6ff |
|
BLAKE2b-256 | 3414174fa43520131281c2cb8796295dfcb09b1ec3db078ac4c341e54132e230 |