This package allow add new variable.
Project description
Version number: 1.1.1
Author: Erick Tucto
Overview
This package allow add new variable to $PROMPT_FIELDS and create new aliases.
Installation / Usage
To install use pip
pip install xontrib-add-variable
Add on ~/.xonshrc
Now you can create new variables to $PROMPT on ~/.xonsh/add_variable.xsh, also create new aliases, please see Example or my wiki
1 xontrib load add_variable
Contributing
Example
On ~/.xonsh/add_variable.xsh or ~/.xonsh/add_variable.py
1from time import strftime2from xontrib.add_variable.decorators import variable34@variable5def timeNow():6return strftime('%H:%M:%S')
On ~/.xonshrc
1xontrib load add_variable23$RIGHT_PROMPT = '{timeNow}'
See image
Credits
This package was created with Cookiecutter and the xontrib template
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xontrib-add-variable-1.2.0.tar.gz.
File metadata
- Download URL: xontrib-add-variable-1.2.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5fca7247bf08e6733c3a89621914ca227c665427171c99ab7e0b62e49eaaf14
|
|
| MD5 |
4649a5897c6016f8d1b6b59df1c2afbb
|
|
| BLAKE2b-256 |
317b1f494223e5829f90a1354e4c43e8f5c8b61c504f32a67578998f72ed244f
|
File details
Details for the file xontrib_add_variable-1.2.0-py3-none-any.whl.
File metadata
- Download URL: xontrib_add_variable-1.2.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3276e49c42fe49a3f146d23e5127da96b15701724067c408607184fa35eb75ae
|
|
| MD5 |
5fc074aa5aa6aef490c862c28676dd40
|
|
| BLAKE2b-256 |
04b05246b4fc11df5a23bbdb0b4839904e1cbf4ddf7dbf8c1589d89591effbda
|