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
xontrib-commands-0.3.0.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for xontrib_commands-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08e3e93d1144c6d1a12abfa76cba449e845c21c0dff81a5a7e1524f58ca7d2d9 |
|
MD5 | ba4b381f77fefc63327401dc9ccfbaac |
|
BLAKE2b-256 | 85939c5096e6c2e680c15c20a3ec51eea13353c021cb487a1f4c900d357cf9c5 |