fixes virtualenv name some more
This commit is contained in:
parent
c89f131474
commit
045f010420
1 changed files with 7 additions and 1 deletions
|
@ -339,7 +339,13 @@ class VirtualEnvPart(Part):
|
|||
self.fragments.append("⬢ ")
|
||||
self.fragments.append(style_color(COLOR_OK))
|
||||
parts = virtualenv.split("/")
|
||||
self.fragments.append(parts[-1])
|
||||
|
||||
if parts[-1] == "env" and len(parts) > 1:
|
||||
venv_name = parts[-2]
|
||||
else:
|
||||
venv_name = parts[-1]
|
||||
|
||||
self.fragments.append(venv_name)
|
||||
self.fragments.append(style_reset())
|
||||
|
||||
class WineprefixPart(Part):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue