Metadata-Version: 2.1
Name: xontrib-commands
Version: 0.2.5
Summary: Useful xonsh-shell commands/alias functions
Home-page: https://github.com/jnoortheen/xontrib-commands
License: MIT
Keywords: xontrib,xonsh
Author: Noortheen Raja NJ
Author-email: jnoortheen@gmail.com
Requires-Python: >=3.6
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: System :: Shells
Classifier: Topic :: System :: System Shells
Classifier: Topic :: Terminals
Requires-Dist: arger (>=1.2.7,<2.0.0); python_version >= "3.6" and python_version < "4.0"
Requires-Dist: rich; python_version >= "3.6" and python_version < "4.0"
Project-URL: Code, https://github.com/jnoortheen/xontrib-commands
Project-URL: Documentation, https://github.com/jnoortheen/xontrib-commands/blob/master/README.md
Project-URL: Issue tracker, https://github.com/jnoortheen/xontrib-commands/issues
Project-URL: Repository, https://github.com/jnoortheen/xontrib-commands
Description-Content-Type: text/markdown

<p align="center">
Useful xonsh-shell commands/alias/completer functions
</p>

## Installation

To install use pip:

``` bash
xpip install xontrib-commands
# or: xpip install -U git+https://github.com/jnoortheen/xontrib-commands
```

## Usage

``` bash
xontrib load commands
```

## building alias

Use [`xontrib.commands.Command`](https://github.com/jnoortheen/xontrib-commands/blob/main/xontrib/commands.py#L9) 
to build [arger](https://github.com/jnoortheen/arger) dispatcher
for your functions.

```py
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
```sh
$ 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
![](./docs/2020-12-02-14-30-47.png)

### 2. report-key-bindggs
![](./docs/2020-12-02-14-30-17.png)

### 3. dev
- command to cd around fast. 
- much like https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/pj

## Credits

This package was created with [xontrib cookiecutter template](https://github.com/jnoortheen/xontrib-cookiecutter).

