Skip to content

Elvish module to activate/deactivate Python virtualenvs & venvs

License

Notifications You must be signed in to change notification settings

elijahr/elvish-python-venv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

elvish-python-venv

Elvish module to activate/deactivate Python virtualenvs & venvs

installation

use epm
epm:install github.com/elijahr/elvish-python-venv

Then put this in ~/.config/elvish/rc.elv:

# setup aliases for working with Python virtual environments
use github.com/elijahr/elvish-python-venv/venv
var venv~ = venv:activate~
var activate~ = venv:activate~
var deactivate~ = venv:deactivate~
set edit:completion:arg-completer[venv] =
set edit:completion:arg-completer[activate] = $edit:completion:arg-completer[venv:activate]

example usage

create a venv or virtualenv

python -m venv .venv

activate the venv

❯ which python
/opt/homebrew/bin/python

❯ activate ./my-env
venv: activated ./my-env

❯ which python
/Users/me/project/venv/bin/python

... install packages, run scripts, etc

deactivate the venv

❯ deactivate
venv: deactivated: ./venv

❯ which python
/opt/homebrew/bin/python3

About

Elvish module to activate/deactivate Python virtualenvs & venvs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages