.bash_completion.d/virtualenv
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 29 Mar 2023 23:42:06 +0300
changeset 1018 831e2c1bf980
parent 734 da0dc50393b6
permissions -rw-r--r--
Completed migration from ~/devel to ~/work.
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