Guest User

Untitled

a guest
Dec 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #compdef _workon workon
  2.  
  3. # Drop this file in any directory in your $fpath variable
  4.  
  5. function _workon {
  6. local line
  7.  
  8. virtualenvs=$(
  9. command find $WORKON_HOME -maxdepth \
  10. ${VIRTUALENVWRAPPER_PROJECT_DEPTH:=5} \
  11. -wholename "*/$VIRTUALENVWRAPPER_ENV_BIN_DIR/activate" | \
  12. command sed "s#^${WORKON_HOME}/##;s#/bin/activate##")
  13.  
  14. _arguments -C \
  15. "1: :($virtualenvs)"
  16. }
Add Comment
Please, Sign In to add comment