Useful xonsh-shell commands/alias functions
Project description
Useful xonsh-shell commands/alias 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
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
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.1.tar.gz
.
File metadata
- Download URL: xontrib-commands-0.2.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.9.11-3-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6342e834254c2ad4714ad3b03f944adbc83e599b0e6c387b8a3f71fd6fd94ba6 |
|
MD5 | c2eb4ad0e5c531e35147130b51de4572 |
|
BLAKE2b-256 | 9e007a0406517bf55c67896f3ca292a8762f4989507849212f54e2051eb476fa |
File details
Details for the file xontrib_commands-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: xontrib_commands-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.9.11-3-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9726209175d38e8be5b83dc5561c7c0135c602d7a12f12495b09d2b527e41dd2 |
|
MD5 | ebf7c6c8da63130dc0e24ad5590b8111 |
|
BLAKE2b-256 | 8fa5c1b892058cc3bbecc36049866a2c79ddf9cb3c7e68a0a029289fc46c41ef |