diff --git a/README.md b/README.md index fa354f7..a068800 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,6 @@ This is a collection of /etc/profile.d files used by the gwebu team. Unless explicitly stated in the file itself, the license is [The Unlicense](https://choosealicense.com/licenses/unlicense/). -## Hooks +## Automation -Create the following hook in your local repository to update the RPM changelog for you: - - -```bash -echo '#!/usr/bin/env bash - -set -eu - -./changelog.sh' > .git/hooks/post-commit -chmod a+x .git/hooks/post-commit -``` +To update the RPM changelog run ./changelog.sh diff --git a/changelog.sh b/changelog.sh index ce2780a..2021c28 100755 --- a/changelog.sh +++ b/changelog.sh @@ -18,6 +18,6 @@ sed -i.bak "s/Version: .*/Version: ${rpm_ver}/" gwebu-profile.spec.in sed -i.bak "s/Release: .*/Release: ${rpm_numeric_rev}/" gwebu-profile.spec.in rm -f gwebu-profile.spec.in.bak -git add gwebu-profile.spec.in +# git add gwebu-profile.spec.in echo "gwebu-profile.spec.in changelog updated" diff --git a/etc/profile.d/z-ps-twtty-7.sh b/etc/profile.d/z-ps-twtty-7.sh index 6a06f0f..551d621 100755 --- a/etc/profile.d/z-ps-twtty-7.sh +++ b/etc/profile.d/z-ps-twtty-7.sh @@ -81,7 +81,14 @@ function prompt_command() { local prompt="--($my_D, Err ${my_P[*]}, $my_TTY)---($PWD)--" if [ -n "${VIRTUAL_ENV:-}" ] && [ -n "$_OLD_VIRTUAL_PS1" ]; then - export my_VENV="${VIRTUAL_ENV##*/}" + if [ -n "$VIRTUAL_ENV_PROMPT" ]; then + my_VENV="${VIRTUAL_ENV_PROMPT%) }" + my_VENV="${my_VENV%) }" + export my_VENV="${my_VENV#(}" + else + # Best guess + export my_VENV="${VIRTUAL_ENV##*/}" + fi prompt="--($my_D, Err ${my_P[*]}, $my_TTY, $my_VENV)---($PWD)--" if [ "${PS1:0:${#my_VENV}+3}" == "($my_VENV) " ]; then # PS1 will be restored by virtual environment's deactivate script. diff --git a/gwebu-profile.spec.in b/gwebu-profile.spec.in index 0c2a7a8..c33ba8b 100644 --- a/gwebu-profile.spec.in +++ b/gwebu-profile.spec.in @@ -1,6 +1,6 @@ Summary: Gwebu profile.d - cool date, prompt with history, aliases Name: gwebu-profile -Version: 1.0.6 +Version: 1.0.7 Release: 0 BuildArch: noarch License: GPLv2 @@ -41,6 +41,9 @@ install -m 0644 etc/profile.d/*.sh %{buildroot}%{_sysconfdir}/profile.d/ %changelog +* Sun Mar 09 2025 Doncho N. Gunchev - 1.0.7-0 +- Improve python virtual environment support (uv) take 2. + * Sat Feb 15 2025 Doncho Gunchev - 1.0.6-0 - Improve python virtual environment support (uv).