Skip to main content

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

  • 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.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

xontrib_commands-0.2.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xontrib-commands-0.2.3.tar.gz
  • Upload date:
  • Size: 6.4 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

Hashes for xontrib-commands-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0dc6faafa39d1668a0d1145894360b116aec389ff0c82697d4ce5f3834b578f3
MD5 f025102fded5df097ac7459b381b47a9
BLAKE2b-256 40046e044dc012cb90035274b56f5229fbbbf9d92a5659c2e046ade72a005e3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xontrib_commands-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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

Hashes for xontrib_commands-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 da030c29669c4e72d0d04c539d065187692ca7976d0a35bda9d6a725c7b11271
MD5 5ef0b7dea7eeab1cef717e0b4333b123
BLAKE2b-256 5d3cd7f2e489a09a6048a6d3e23e5d501832b83b34e4c8d89ddb65fc4b6aa8e0

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