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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xontrib-commands-0.2.4.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.18-1-MANJARO

File hashes

Hashes for xontrib-commands-0.2.4.tar.gz
Algorithm Hash digest
SHA256 5f61f462c478e9fce4e260191dd5be58dc35dab4dd4fd200dd328306a5938e39
MD5 17294668c0c3550b363e1b2b811513d7
BLAKE2b-256 677604acb1c55f48a3945dad286407f1132e27ed5631dffe8a54c1be13a2631f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for xontrib_commands-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 20670f05523313087997017437560f633ef55d9a379bdcadf1b315412d13cbe4
MD5 b471c1cc05a55127fdb2e50ad59f31c3
BLAKE2b-256 902515b3777e820ec7a6e67892ae793b1dded254480cf28b2b9f44b42b4a39cd

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