Skip to main content

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

Credits

This package was created with xontrib cookiecutter template.

Project details


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.2.7.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

xontrib_commands-0.2.7-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file xontrib-commands-0.2.7.tar.gz.

File metadata

  • Download URL: xontrib-commands-0.2.7.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.11.10-1-MANJARO

File hashes

Hashes for xontrib-commands-0.2.7.tar.gz
Algorithm Hash digest
SHA256 cb88c8c6a1d7c4c0336376ddbad7ee0f4f952fa1f8112b8378f51ea5e907808f
MD5 35c75ccf8ed8b3c31734d571d6ed3979
BLAKE2b-256 58911c72cb00a6526429ce363029a0616b34a57b4f487f511ef4879b979e451c

See more details on using hashes here.

File details

Details for the file xontrib_commands-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: xontrib_commands-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.11.10-1-MANJARO

File hashes

Hashes for xontrib_commands-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 400ccaf03d2da7c12266fe03e6228014d4c70656d2fed93a60234fdf02fd9ec7
MD5 c746854a31729010588846fd7dc70636
BLAKE2b-256 760862de2feeb80cd013e1d4b6a70d1e0799499cb6c338176b1ed509ec4967e8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page