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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xontrib-commands-0.2.6.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.6-1-MANJARO

File hashes

Hashes for xontrib-commands-0.2.6.tar.gz
Algorithm Hash digest
SHA256 230db419443bb828f6894f0d6fe8b2fb6ba37a2055f02507a69fc32045534a07
MD5 072ed1c59f8110ab563f410ded8e686d
BLAKE2b-256 91b3bd188247679198c08a02ee31ce7c1baf7cb9292ade6c0d58ac37ee5ebbb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xontrib_commands-0.2.6-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.6-1-MANJARO

File hashes

Hashes for xontrib_commands-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b4773983c837c45fed94bb372d8121c2b957a5dc6811c0ca8dd78e393fe41716
MD5 5c3daf7739a3c77d08556d3851d90c16
BLAKE2b-256 e0c96898df130cbda3951e88fc7f3dd34f767536eada987850176251a46a821a

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