Skip to content

Instantly share code, notes, and snippets.

@mgershovitz
Created October 11, 2019 08:06
Show Gist options
  • Save mgershovitz/459e532d3b2c38e1a069947d575b8414 to your computer and use it in GitHub Desktop.
Save mgershovitz/459e532d3b2c38e1a069947d575b8414 to your computer and use it in GitHub Desktop.
Project env switch function complete with completion
function repo {
source ~/virtual_envs/$1/bin/activate;
cd ~/git_repositories/$1
}
function _repo {
_arguments "1: :($(ls ~/git_repositories))"
}
compdef _repo repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment