.bash_completion.d/virtualenv
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 05 Jul 2017 11:46:02 +0300
changeset 865 2fd1c329e686
parent 734 da0dc50393b6
permissions -rw-r--r--
Added --build-cache option.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
726
926f9481feee virtualenv
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
# -*- mode: sh; sh-shell-file: bash -*-
926f9481feee virtualenv
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
926f9481feee virtualenv
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
_virtualenv()
926f9481feee virtualenv
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
{
727
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
     5
  local _opts="--version -h --help -v --verbose -q --quiet --clear --system-site-packages \
726
926f9481feee virtualenv
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
     --always-copy --unzip-setuptools --relocatable --no-setuptools --no-pip --extra-search-dir= --prompt= --python="
727
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
     7
  local cur
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
     8
  cur=${COMP_WORDS[COMP_CWORD]}
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
     9
  case $cur in
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
    10
    -*) COMPREPLY=( $(compgen -W '$_opts'  -- $cur) ) ;;
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
    11
    *) COMPREPLY=( $(compgen -d -- $cur) )
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
    12
  esac
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
    13
  return 0
734
da0dc50393b6 Reindent sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 727
diff changeset
    14
} &&
727
42d012e9ede1 Reindent code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 726
diff changeset
    15
    complete -F _virtualenv virtualenv
726
926f9481feee virtualenv
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16