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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xontrib-commands-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 67b3aac98309fce4241f62b3fe71cf80eff1e45c5ecb479150e7186ae64a2424
MD5 9ac2168728fd6708a26680870bc51ad5
BLAKE2b-256 247841e4d4ed2b872e6a384128f4b70e04b67c46447cf6562ad9ae09974cf724

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xontrib_commands-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7661c895daa201270f28270d26417d2db36c27877eb33a9c292655eb752c3c3
MD5 a7d1d74f2d7722ee1626f5f7d0bf2667
BLAKE2b-256 60f3041c51e2701ec50e49608bc50242dc93c2662b1b8422f596e73546be3f9e

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