Skip to content

Commit 7cae3d5

Browse files
committed
fixed bug with PS1 prompt color
1 parent 9e733a6 commit 7cae3d5

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

svet/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.1"
1+
__version__ = "0.2.2"

svet/main.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,25 @@ def shell(venvDir: Path, venvName: str):
185185
raise VenvDoesNotExistError
186186

187187
useColor = True
188-
YELLOW = "\e[33m"
189-
CYAN = r"\e[36m"
190-
NOCOLOR = r"\e[0m" #
188+
# YELLOW = "\e[33m"
189+
# CYAN = r"\e[36m"
190+
# NOCOLOR = r"\e[0m" #
191+
192+
GREEN = "\e[32m\]"
193+
MAGENDA = "\e[35m\]"
194+
YELLOW = "\e[33m\]"
195+
CYAN = r"\e[36m\]"
196+
BLUE = r"\e[34m\]"
197+
NOCOLOR = r"\e[0m\]" #
191198

192199
activatePathQuoted = quote(str(venvDir / "bin" / "activate"))
193200

201+
venvName = "(" + venvName + ")"
202+
194203
if useColor:
195-
ps = f"\\[{CYAN}svet@{venvName}> {NOCOLOR}\\]" # fancy but buggy
204+
ps = f"\\[{YELLOW}{venvName}{NOCOLOR}:{CYAN}\\W{NOCOLOR}$ \\]" # fancy but buggy
196205
else:
197-
ps = f"vep@{venvName}> "
206+
ps = f"vep@{venvName}$ "
198207

199208
commands = [
200209
f'source {activatePathQuoted}',

0 commit comments

Comments
 (0)