Commits

Doug Hellmann  committed 01146a7

Add tab completion based on Arthur Koziel's version at http://arthurkoziel.com/2008/10/11/virtualenvwrapper-bash-completion/

--HG--
extra : convert_revision : svn%3A98f53aa3-d424-0410-b225-a548b0275c4d/Projects/virtualenvwrapper/trunk%401736

  • Participants
  • Parent commits db9bbdb

Comments (0)

Files changed (1)

File virtualenvwrapper_bashrc

         source "$VIRTUAL_ENV/bin/postactivate"
     fi
 	return 0
-}
+}
+
+#
+# Set up tab completion.  (Adapted from Arthur Koziel's version at 
+# http://arthurkoziel.com/2008/10/11/virtualenvwrapper-bash-completion/)
+# 
+_virtualenvs ()
+{
+    local cur="${COMP_WORDS[COMP_CWORD]}"
+    COMPREPLY=( $(compgen -W "`show_workon_options`" -- ${cur}) )
+}
+
+complete -o default -o nospace -F _virtualenvs workon
+complete -o default -o nospace -F _virtualenvs rmvirtualenv