Trey Hunner 🐍 on Nostr: direnv users who auto-activate your .venv directory: how do you show the correct venv ...
direnv users who auto-activate your .venv directory: how do you show the correct venv prompt (not the .venv directory) in your PS1 shell prompt?
The only solutions I'm finding involve $(basename $VIRTUAL_ENV), which gives the venv directory name, not the --prompt that I gave on venv creation.
https://github.com/direnv/direnv/wiki/Python#zshPublished at
2024-10-01 14:29:39 UTCEvent JSON
{
"id": "9a084553b9715ef2c0c552c4a3656b4b9b83a80a4d115c50ea1ef481311eb4e4",
"pubkey": "7e9159fbfd5526415c8d2de2e4c7654e3660883f9ccae720a70fa3c1f3cf1f45",
"created_at": 1727792979,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/@treyhunner/113232640710715449",
"web"
],
[
"proxy",
"https://mastodon.social/users/treyhunner/statuses/113232640710715449",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/treyhunner/statuses/113232640710715449",
"pink.momostr"
],
[
"-"
]
],
"content": "direnv users who auto-activate your .venv directory: how do you show the correct venv prompt (not the .venv directory) in your PS1 shell prompt?\n\nThe only solutions I'm finding involve $(basename $VIRTUAL_ENV), which gives the venv directory name, not the --prompt that I gave on venv creation.\n\nhttps://github.com/direnv/direnv/wiki/Python#zsh",
"sig": "d9f6cff81ce5d1ca2f149f8a37bb455148c48a3320b629c071457e17baa803721fcddd00b3dc50fb4e1f3a74f2596327dc7e307111291bdcaa0dbcfe5696e104"
}