aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-10-24 15:31:45 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-10-24 15:31:45 +0200
commit2667e44ca957ec75f61266305e375c011fc52cd8 (patch)
treee650843ebe02dea61f9734f44dcc6244aa211b3f /.bashrc
parent29b5b5b74d0553b98086459a614366ec320f0dfb (diff)
Add shell functions for Python venvs
It is an ugly system, and it seems it is practically inescapable. Truly an homage to the quality of the programming language and the devs who love it without question.
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index f526efa..ca3a9d3 100644
--- a/.bashrc
+++ b/.bashrc
@@ -72,6 +72,9 @@ __precmd()
PS1+="\001$SHELLC_F_LIGHTGRAY\002:\001$SHELLC_RESET_COLOR_F\002"
PS1+="\001$SHELLC_F_BLUE\002\w\001$SHELLC_RESET_COLOR_F\002"
+ # Add venv indicator
+ PS1+="\001$SHELLC_F_CYAN\002#$(awk -F/ '{ print $(NF-1) }' <<< "$PYTHON_VENV_DIR")\001$SHELLC_RESET_COLOR_F\002"
+
# Add git status
if git rev-parse --is-inside-work-tree &> /dev/null
then