Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature adding extra sections #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ericktucto
Copy link

Create a new method, pl_add_section, to add new sections
Examples:

On .xonshrc

$PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
$PL_PROMPT = 'user>time'
xontrib load powerline

Or (.xonshrc)

def user():
    return [' {user} ', 'WHITE', '#555']


$PL_EXTRA_SEC = { 'user': user }
$PL_PROMPT = 'user>time'
xontrib load powerline

On terminal

>>> $PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
>>> $PL_PROMPT = 'user>time'
>>> pl_build_prompt

Create a new method, pl_add_section, to add new sections
Examples:

On .xonshrc
```python
$PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
$PL_PROMPT = 'user>time'
xontrib load powerline
```

On terminal
```
>>> $PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
>>> $PL_PROMPT = 'user>time'
>>> pl_build_prompt
```
vaaaaanquish added a commit to vaaaaanquish/xontrib-powerline2 that referenced this pull request Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant