diff -r 926f9481feee -r 42d012e9ede1 .bash_completion.d/virtualenv --- a/.bash_completion.d/virtualenv Thu Feb 19 22:59:47 2015 +0200 +++ b/.bash_completion.d/virtualenv Thu Feb 19 23:11:49 2015 +0200 @@ -2,12 +2,15 @@ _virtualenv() { - local _opts="--version -h --help -v --verbose -q --quiet --clear --system-site-packages \ + local _opts="--version -h --help -v --verbose -q --quiet --clear --system-site-packages \ --always-copy --unzip-setuptools --relocatable --no-setuptools --no-pip --extra-search-dir= --prompt= --python=" - local cur - cur=${COMP_WORDS[COMP_CWORD]} - COMPREPLY=( $(compgen -W '$_opts' -- $cur) ) - return 0 -} && -complete -F _virtualenv virtualenv + local cur + cur=${COMP_WORDS[COMP_CWORD]} + case $cur in + -*) COMPREPLY=( $(compgen -W '$_opts' -- $cur) ) ;; + *) COMPREPLY=( $(compgen -d -- $cur) ) + esac + return 0 +} && \ + complete -F _virtualenv virtualenv