Library of xonsh subprocess specification modifiers.
Project description
Library of xonsh subprocess specification modifiers.
If you like the idea click ⭐ on the repo and tweet.
Installation
To install use pip:
xpip install xontrib-spec-mod
# or: xpip install -U git+https://github.com/anki-code/xontrib-spec-mod
Usage
xontrib load spec_mod
Transform output to object
$(@lines ls /)
# ['/bin', '/etc', '/home']
$(@json echo '{"a":1}') # Try with `curl` ;)
# dict({"a":1})
$(@path which xonsh)
# Path('/path/to/xonsh')
$(@path which xonsh).parent
# Path('/path/to')
aliases['ydig'] = '@yaml dig +yaml' # Update `dig` via `brew install bind` to have `+yaml`.
y = $(ydig google.com)
y[0]['type']
# 'MESSAGE'
Error handling
$RAISE_SUBPROC_ERROR = True
if ![@noerr ls nononofile]: # Do not raise exception in case of error.
echo file
Development
# install pre-commit plugins and activate the commit hook
pre-commit install
pre-commit autoupdate
Credits
This package was created with xontrib 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_spec_mod-0.0.1.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for xontrib_spec_mod-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffecaac203d8c4983f143a1cec3f9f28098b30dd4f78c7f526c44a130450b3a8 |
|
MD5 | fa1c0bd4de557c382742116a43f1b686 |
|
BLAKE2b-256 | d682f2d58da44113ba604e387d6fcf796d2c2637f87ee8cbbb2321eb1d443d31 |