Commits

Doug Hellmann committed 4738f0b

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

  • Participants
  • Parent commits 7e27d04

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