Skip to content

Instantly share code, notes, and snippets.

@zaccharieramzi
Created November 27, 2017 10:17
Show Gist options
  • Save zaccharieramzi/89d04ab3310e8db780c0be45314a9f73 to your computer and use it in GitHub Desktop.
Save zaccharieramzi/89d04ab3310e8db780c0be45314a9f73 to your computer and use it in GitHub Desktop.
A little convenience `cd` to automatically activate the virtual environment of the directory you are `cd`-ing into. Works on ZSH with auto-completion.
# convenience cd
function cdvenv(){
cd $1;
source venv/bin/activate;
}
compdef _dirs cdvenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment