Created
          July 22, 2016 20:28 
        
      - 
      
 - 
        
Save rafacv/f8edbae533e7e26182c2417bd91411ce to your computer and use it in GitHub Desktop.  
    Simple bash/zsh functions to use VirtualEnv
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # VirtualEnv | |
| function venv() { | |
| if [ -n "$1" ]; then | |
| venv=$1 | |
| shift | |
| if [ ! -d ~/.venv/$venv ]; then | |
| virtualenv ~/.venv/$venv $* | |
| fi | |
| source ~/.venv/$venv/bin/activate | |
| fi | |
| } | |
| function lsvenv() { | |
| ls -x1 ~/.venv/ | |
| } | |
| function rmvenv() { | |
| if [ -n "$1" ]; then | |
| if [ -d ~/.venv/$1 ]; then | |
| rm -rf ~/.venv/$1 | |
| fi | |
| fi | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment