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 strftime
2from xontrib.add_variable.decorators import variable
34
@variable
5def timeNow():
6return strftime('%H:%M:%S')
On ~/.xonshrc
1xontrib load add_variable
23
$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
Close
Hashes for xontrib-add-variable-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5fca7247bf08e6733c3a89621914ca227c665427171c99ab7e0b62e49eaaf14 |
|
MD5 | 4649a5897c6016f8d1b6b59df1c2afbb |
|
BLAKE2b-256 | 317b1f494223e5829f90a1354e4c43e8f5c8b61c504f32a67578998f72ed244f |
Close
Hashes for xontrib_add_variable-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3276e49c42fe49a3f146d23e5127da96b15701724067c408607184fa35eb75ae |
|
MD5 | 5fc074aa5aa6aef490c862c28676dd40 |
|
BLAKE2b-256 | 04b05246b4fc11df5a23bbdb0b4839904e1cbf4ddf7dbf8c1589d89591effbda |