Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I modified my bash prompt to detect and auto-activate Python environments, and show if one is currently active. Haven’t thought about activate in years. It’s great.


Yes, I did that on my work laptop with fish, since I only ever used it with the work project.

On my personal machine I don't bother with venvs, so also haven't thought about it in years. But was trying to figure out what the "workon" command did for GP.


`workon` lists all virtualenvs you have in your virtualenvs folder and `workon foo` activates environment foo

this way I have all my envs in ~/virtual and all my projects in ~/projects and just `workon xyz` when I want to be in a certain venv for a given project (which doesn't always map one-to-one)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: