Skip to content

ericktucto/xontrib-add-variable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xontrib Add Variable

Version number: 1.1.1

Author: Erick Tucto

Overview

This package allow add new variable to $PROMPT_FIELDS and create new aliases.

Installation / Usage

  1. To install use pip
pip install xontrib-add-variable
  1. 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

  1. Erick Tucto

Example

  1. 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')
  1. On ~/.xonshrc
1 xontrib load add_variable
2 
3 $RIGHT_PROMPT = '{timeNow}'
  1. See image

terminal.png

Credits

This package was created with Cookiecutter and the xontrib template

About

This package allow add new variable.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages