Skip to content

Commit

Permalink
Merge pull request #312 from amkarthik/master
Browse files Browse the repository at this point in the history
Real Virtual env name while using "pipenv"
  • Loading branch information
b-ryan authored Feb 26, 2018
2 parents d0dec6c + 21cfded commit ae33f7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions powerline_shell/segments/virtual_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ def add_to_powerline(self):
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 not env:
return
env_name = os.path.basename(env)
Expand Down

0 comments on commit ae33f7e

Please sign in to comment.