mirror of
https://github.com/b-ryan/powerline-shell.git
synced 2026-09-10 07:26:28 -04:00
Merge 9876bd7ed3 into 4b19aa47f1
This commit is contained in:
commit
b4d2434b09
|
|
@ -7,9 +7,14 @@ class Segment(BasicSegment):
|
|||
env = os.getenv('VIRTUAL_ENV') \
|
||||
or os.getenv('CONDA_ENV_PATH') \
|
||||
or os.getenv('CONDA_DEFAULT_ENV')
|
||||
|
||||
if os.getenv('VIRTUAL_ENV') \
|
||||
and os.path.basename(env) == '.venv':
|
||||
env = os.path.basename(os.path.dirname(env))
|
||||
|
||||
if os.getenv('POWERLINE_ENV_NAME'):
|
||||
env = os.getenv('POWERLINE_ENV_NAME')
|
||||
|
||||
if not env:
|
||||
return
|
||||
env_name = os.path.basename(env)
|
||||
|
|
|
|||
Loading…
Reference in a new issue