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

Uploaded Source

Built Distribution

xontrib_commands-0.3.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xontrib-commands-0.3.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.6 Linux/5.13.8-1-MANJARO

File hashes

Hashes for xontrib-commands-0.3.0.tar.gz
Algorithm Hash digest
SHA256 87ebacb9084fee09aa466c8c518e64102e052afdedada293561cf90c61debd40
MD5 aa0068e814903041ab5ca36ea42e1972
BLAKE2b-256 cc97d687b020babd286a003ccfd921eee49b982a6257a9f5ad2e24520faa2024

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xontrib_commands-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.6 Linux/5.13.8-1-MANJARO

File hashes

Hashes for xontrib_commands-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08e3e93d1144c6d1a12abfa76cba449e845c21c0dff81a5a7e1524f58ca7d2d9
MD5 ba4b381f77fefc63327401dc9ccfbaac
BLAKE2b-256 85939c5096e6c2e680c15c20a3ec51eea13353c021cb487a1f4c900d357cf9c5

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