Skip to content

Instantly share code, notes, and snippets.

@markph0204
Created April 29, 2017 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markph0204/fe1a1a206a99dcc2f89676c132ce593c to your computer and use it in GitHub Desktop.
Save markph0204/fe1a1a206a99dcc2f89676c132ce593c to your computer and use it in GitHub Desktop.
Pyenv shortcut
# Create a new virtualenv using the last component of path name
# Activate immediately when created
function pyenv_easy_3() {
result=${PWD##*/}
printf 'Create virtualenv for named local path...'
printf '%s\n' $result
pyenv virtualenv 3.6.1 $result
printf 'Setting local to new virtualenv...\n'
pyenv local $result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment