We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b8ef97 commit 870fb63Copy full SHA for 870fb63
setup.py
@@ -9,7 +9,7 @@
9
10
setup(
11
name='xontrib-powerline',
12
- version='0.1.0',
+ version='0.1.1',
13
description='Powerline for Xonsh shell',
14
long_description=open('README.md').read(),
15
long_description_content_type="text/markdown",
xontrib/powerline.xsh
@@ -20,9 +20,15 @@ $PL_COLORS = {
20
"who": ("BLACK", "#666666"),
21
"short_cwd": ("BLACK", "#50a0a0"),
22
"cwd": ("#00adee", "WHITE"),
23
+ "git_root": ("BLUE", "WHITE"),
24
+ "git_sub_dir": ("WHITE", "WHITE"),
25
"history": ("WHITE", "#333333"),
26
"venv": ("BLACK", "INTENSE_GREEN"),
27
} if 'PL_COLORS' not in ${...} else $PL_COLORS
28
+if 'git_root' not in $PL_COLORS:
29
+ $PL_COLORS.update({"git_root": ("BLUE", "WHITE")})
30
+if 'git_sub_dir' not in $PL_COLORS:
31
+ $PL_COLORS.update({"git_sub_dir": ("WHITE", "WHITE")})
32
33
34
if ptk_shell_type() == 'prompt_toolkit2':
@@ -89,7 +95,7 @@ def cwd():
89
95
break
90
96
ni -= 1
91
97
if ni != 0: # if ni ==0 subdirectory matching failed
92
- ps[ni] = '{BLUE}%s{WHITE}' % ps[ni]
98
+ ps[ni] = '{%s}%s{%s}' % ($PL_COLORS["git_root"][0], ps[ni], $PL_COLORS["git_sub_dir"][0])
93
99
94
100
if len(ps) > $PL_PARTS:
101
new_ps = [ps[0]]
0 commit comments