Version number: 1.1.1
Author: Erick Tucto
This package allow add new variable to $PROMPT_FIELDS
and
create new aliases.
- 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
- On
~/.xonsh/add_variable.xsh
or~/.xonsh/add_variable.py
1 from time import strftime
2 from xontrib.add_variable.decorators import variable
3
4 @variable
5 def timeNow():
6 return strftime('%H:%M:%S')
- On
~/.xonshrc
1 xontrib load add_variable
2
3 $RIGHT_PROMPT = '{timeNow}'
- See image
This package was created with Cookiecutter and the xontrib template