Skip to main content

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

  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

<small class="ln">1 </small>xontrib load add_variable

Contributing

  1. Erick Tucto

Example

  1. On ~/.xonsh/add_variable.xsh or ~/.xonsh/add_variable.py

<small class="ln">1 </small>from time import strftime
<small class="ln">2 </small>from xontrib.add_variable.decorators import variable
<small class="ln">3 </small>
<small class="ln">4 </small>@variable
<small class="ln">5 </small>def timeNow():
<small class="ln">6 </small>    return strftime('%H:%M:%S')
  1. On ~/.xonshrc

<small class="ln">1 </small>xontrib load add_variable
<small class="ln">2 </small>
<small class="ln">3 </small>$RIGHT_PROMPT = '{timeNow}'
  1. See image

terminal.png

Credits

This package was created with Cookiecutter and the 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-add-variable-1.2.0.tar.gz (2.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page