Make scripts/powerline use os.environ['PWD'] for .getcwd() if present
Closes #330
This commit is contained in:
parent
8a51d99389
commit
7370876c35
|
@ -13,7 +13,10 @@ except ImportError:
|
|||
|
||||
if __name__ == '__main__':
|
||||
args = get_argparser(description=__doc__).parse_args()
|
||||
powerline = ShellPowerline(args, run_once=True)
|
||||
kwargs = {}
|
||||
if 'PWD' in os.environ:
|
||||
kwargs['getcwd'] = lambda: os.environ['PWD']
|
||||
powerline = ShellPowerline(args, run_once=True, **kwargs)
|
||||
rendered = powerline.renderer.render(width=args.width, side=args.side, segment_info=args)
|
||||
try:
|
||||
sys.stdout.write(rendered)
|
||||
|
|
Loading…
Reference in New Issue