From 2667e44ca957ec75f61266305e375c011fc52cd8 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Tue, 24 Oct 2023 15:31:45 +0200 Subject: 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. --- .bashrc | 3 +++ 1 file changed, 3 insertions(+) (limited to '.bashrc') 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 -- cgit v1.1