Skip to content

Commit 01146a7

Browse files
committed
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
1 parent db9bbdb commit 01146a7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

virtualenvwrapper_bashrc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,17 @@ function workon () {
114114
source "$VIRTUAL_ENV/bin/postactivate"
115115
fi
116116
return 0
117-
}
117+
}
118+
119+
#
120+
# Set up tab completion. (Adapted from Arthur Koziel's version at
121+
# http://arthurkoziel.com/2008/10/11/virtualenvwrapper-bash-completion/)
122+
#
123+
_virtualenvs ()
124+
{
125+
local cur="${COMP_WORDS[COMP_CWORD]}"
126+
COMPREPLY=( $(compgen -W "`show_workon_options`" -- ${cur}) )
127+
}
128+
129+
complete -o default -o nospace -F _virtualenvs workon
130+
complete -o default -o nospace -F _virtualenvs rmvirtualenv

0 commit comments

Comments
 (0)