File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -146,14 +146,19 @@ function workon () {
146
146
# Set up tab completion. (Adapted from Arthur Koziel's version at
147
147
# http://arthurkoziel.com/2008/10/11/virtualenvwrapper-bash-completion/)
148
148
#
149
- _virtualenvs ()
150
- {
151
- local cur="${COMP_WORDS[COMP_CWORD]}"
152
- COMPREPLY=( $(compgen -W "`show_workon_options`" -- ${cur}) )
153
- }
154
149
155
- complete -o default -o nospace -F _virtualenvs workon
156
- complete -o default -o nospace -F _virtualenvs rmvirtualenv
150
+ if [ -n "$BASH" ] ; then
151
+ _virtualenvs ()
152
+ {
153
+ local cur="${COMP_WORDS[COMP_CWORD]}"
154
+ COMPREPLY=( $(compgen -W "`show_workon_options`" -- ${cur}) )
155
+ }
156
+
157
+ complete -o default -o nospace -F _virtualenvs workon
158
+ complete -o default -o nospace -F _virtualenvs rmvirtualenv
159
+ elif [ -n "$ZSH_VERSION" ] ; then
160
+ compctl -g "`show_workon_options`" workon rmvirtualenv
161
+ fi
157
162
158
163
# Path management for packages outside of the virtual env.
159
164
# Based on a contribution from James Bennett and Jannis Leidel.
You can’t perform that action at this time.
0 commit comments