Skip to content

Commit 77cfb5d

Browse files
committed
windows compatibility fiz, v0.3.3
1 parent 5e292ed commit 77cfb5d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='xontrib-powerline',
13-
version='0.3.2',
13+
version='0.3.3',
1414

1515
description='Powerline for Xonsh shell',
1616
long_description=long_description,

xontrib/powerline.xsh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from os import path
23
from collections import namedtuple
34
from time import strftime
45

@@ -17,6 +18,7 @@ $PL_RSEP = ''
1718
$PL_SEP_THIN = ''
1819

1920
available_sections = {}
21+
HOME = path.expanduser('~')
2022

2123

2224
def register_sec(f):
@@ -40,8 +42,8 @@ def short_cwd():
4042

4143

4244
def compress_home(path):
43-
if path.startswith($HOME):
44-
path = '~' + path[len($HOME):]
45+
if path.startswith(HOME):
46+
path = '~' + path[len(HOME):]
4547
return path
4648

4749

0 commit comments

Comments
 (0)