From 77cfb5d65fa5776d29a7fdac6299fa6a5fa804f6 Mon Sep 17 00:00:00 2001 From: Leonardo Santagada Date: Sun, 19 Mar 2017 08:12:20 +0100 Subject: [PATCH] windows compatibility fiz, v0.3.3 --- setup.py | 2 +- xontrib/powerline.xsh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index feca9d9..2f029d3 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='xontrib-powerline', - version='0.3.2', + version='0.3.3', description='Powerline for Xonsh shell', long_description=long_description, diff --git a/xontrib/powerline.xsh b/xontrib/powerline.xsh index cc7f4b9..2b33e03 100644 --- a/xontrib/powerline.xsh +++ b/xontrib/powerline.xsh @@ -1,4 +1,5 @@ import os +from os import path from collections import namedtuple from time import strftime @@ -17,6 +18,7 @@ $PL_RSEP = '' $PL_SEP_THIN = '' available_sections = {} +HOME = path.expanduser('~') def register_sec(f): @@ -40,8 +42,8 @@ def short_cwd(): def compress_home(path): - if path.startswith($HOME): - path = '~' + path[len($HOME):] + if path.startswith(HOME): + path = '~' + path[len(HOME):] return path